Search code examples
asp.net-mvcasp.net-mvc-3iisc#-4.0window

Unable to install website msi using command line in Window10


Overview : Installing a MVC3 Website using C# command line. The application installed correctly in Win7, win8, server 2008 & 2013. The same installer not working in window10 after configure IIS correctly.

Error Message : Product: Web Client -- This setup requires Internet Information Server 5.1 or higher and Windows XP or higher. This setup cannot be installed on Windows 2000. Please install Internet Information Server or a newer operating system and run this setup again.

Error Message in Event log(MsiInstaller) : Windows Installer installed the product. Product Name: Web Client. Product Version: 3.x.xx. Product Language: 1033. Manufacturer: xxxx. Installation success or error status: 1603.

Installer code :

 Process p = new Process();
            p.StartInfo.FileName = msiexec.exe;
            p.StartInfo.Arguments ="/qn /i \"" + Settings.InstallationDirectory + "Website\\WebClient.msi\"";
            p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            p.Start();
            p.WaitForExit();

unable to see installed website in IIS.


Solution

  • I discovered there was some configuration problems with the Conditions Editor (Requirements on Target Machine)

    enter image description here

    Walkthrough:

    Go to the setup project setup and Launch the Conditions Editor. enter image description here

    Right click on the IIS Condition and view the properties

    enter image description here

    Check Condition Formula; it should as the following: (IISMAJORVERSION >= "#5" AND IISMINORVERSION >= "#1") OR IISMAJORVERSION >= "#6"

    If you want to install on IIS Version 7.5 and above then use the below condition formula:

    (IISMAJORVERSION >= "#6" AND IISMINORVERSION >= "#1") OR IISMAJORVERSION >= "#10"

    In Windows 10 Default IISMINORVERSION value = 0 (but my code is 1 and i have modified my setup accordingly).

    How to fine MIN and MAX Value :

    1. Open system registry
    2. Move to following location "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters"

    3. Left side panel find the MIN and MAX default values (refer below the screen)enter image description here

    Above the changes working for me and let me know if any