/build/static/layout/Breadcrumb_cap_w.png

Filtering Workstation OSs for Install Conditions...

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   [ + ] Show 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. - Superfreak3 7 years ago

Answers (2)

Posted by: sparky86 7 years ago
Fourth Degree Brown Belt
1
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)))
Posted by: Superfreak3 7 years ago
2nd Degree Black Belt
1
Couldn't I just use VersionNT>=600 and MsiNTProductType>1?
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ