CA to find out which version of Windows?

This issue has been solved. See solution.
Shanushaan's picture

Hi, 
I was just looking into the MSDN for properties to find out whether there is any specific property that tells me about the OS used (Means Vista, Win2k3, XP, Win2K or Win2K8). 
The property I found is MSIWin32AssemblySupport which sets the version of the OS. 
Two questions : 
AnyBody who can tell me how to map the versions into Specific OS name?
and
if this property is available in all MSIexec Versions? 

Regards
Rohit 


Shanushaan's picture

Got Something here :  With a

Got Something here : 
With a Minor GLITCH on how to differentiate between Vista and Win2K8 
http://msdn.microsoft.com/en-us/library/aa370556(VS.85).aspx

VBScab's picture

Use a WMI-based script in a Custom Action

You can determine pretty much anything about a machine using WMI, which is more or less guaranteed to be present on those targets, although a well-authored script will obviously test for the WMI object's successful creation before proceeding.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

EdT's picture

VersionNT

The place to look for windows installer properties is in the help file MSI.CHM
Search on "Property reference".

In the subcategory of Operating System Properties, there are the two predefined properties called VersionNT and VersionNT64.

Don't use MSIWin32AssemblySupport as this just reports whether the operating system supports Win32 assemblies. It doesn't tell you the version of the operating system at all.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

nac's picture

Exactly

VersionNT eg. VersionNT>501 (greate than XP)

I dont know how IMPOSEBLE spells

VBScab's picture

Nac, re-read the original post

The OP wants to differentiate at a more granular level that '> 501'. If you click th elink, you'll see that Vista and WS2008 both report '601' which, if you want server-specific features or components to be installed (or not!), isn't "fine" enough.

Not reading posts properly is my job.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

Evan.Border@gmail.com's picture

MsiNTProductType

Solution

You'll need to use two properties to see the difference between Windows 7 / Windows Server 2008 R2 or Windows Vista / Windows Server 2008:
VersionNT and MsiNTProductType.

If I wanted to cause the install to fail if the OS is older than Windows 7 and also guarantee that it's not a server OS, I could use the following as a Launch Condition:

(VersionNT >= 601) AND (MsiNTProductType = 1)

Currently only Windows 7 could satisfy this.

If I wanted to guarantee that it was a server OS no older than Windows Server 2008, I could use the following:

(VersionNT >= 600) AND (MsiNTProductType > 1)

-Evan

EdT's picture

MSI.CHM

MSINTProductType is also included in the list of operating system predefined properties that can be found in MSI.CHM

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.