Hi All,

I'm wondering what conditions I could use as Install Conditions to only allow installation on Server 2008, 2008 R2 and 2012 R2.  I've used the VersionNT/VersionNT64 properties and their OS values before, but the problem is that the value and the WindowsBuild values can be the same for both the server and accompanying workstation OS.  ServicePackLevel may not work either.

Is this doable?

I'm not sure if it was early versions of InstallShield or a different product I used back in the day, but I thought at one time you simply picked the OS you wanted to allow installation on via checkboxes.  That would be cool, but I guess that would fall behind the times when a new OS is released - forcing the resort to generating my own condition again.

Anyway, if I can find a way to filter out workstations OSs that would be Great!

If I can't do it with Windows Installer properties I guess I would write a front end widget to set a property based on OS.

Thanks for the help in advance!!
1 Comment   [ - ] Hide Comment


  • I found this which I'm going to use in conjunction with VersionNT...

    using (ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem"))
    foreach (ManagementObject managementObject in searcher.Get())
    // ProductType will be one of:
    // 1: Workstation
    // 2: Domain Controller
    // 3: Server
    uint productType = (uint)managementObject.GetPropertyValue("ProductType");

    if (productType != 1)
    'Set the ISSERVEROS property

    I'll run this CA code up front then use VersionNT>=600 AND ISSERVEROS as the launch condition.

    If there's an easier way with Windows Installer properties, I'm certainly up for that.
Please log in to comment

Answer this question or Comment on this question for clarity


the following items in the launch condition tablet will only allow the application to install on to 2012 2008 R2 and 2008 machines

(Not Version9X) And (Not VersionNT=400) And (Not VersionNT=500) And (Not (VersionNT=600 And (MsiNTProductType=1))) And (Not (VersionNT=601 And (MsiNTProductType=1))) And (Not VersionNT=602) And (Not (VersionNT=603 And (MsiNTProductType=1)))
Answered 07/27/2016 by: sparky86
Fourth Degree Brown Belt

Please log in to comment
Couldn't I just use VersionNT>=600 and MsiNTProductType>1?
Answered 07/27/2016 by: Superfreak3
Second Degree Black Belt

Please log in to comment