This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Install Conditions - Server vs Workstation OSs.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 26, 2016
07:56 PM
Install Conditions - Server vs Workstation OSs.
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!!
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!!
2 Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 26, 2016
08:40 PM
I found this which I'm going to use in conjunction with VersionNT...
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 27, 2016
08:39 AM
See MsiNTProductType.
