cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Roman1
Level 9

MSI: Any possibility to find out, if msi runs on W10?

Hello,
is there any possibility to find out, if msi setup runs on W8.1 or W10 ?
How to realize it for BASIC-MSI, please ?
Labels (1)
0 Kudos
(8) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

We won't know for certain until Windows 10 actually ships, but from all indications that I've seen, Microsoft is intentionally preventing this. As of the preview we do not offer any supported way to do this. Microsoft previously started preventing custom actions from knowing the version of Windows, and is now reporting an incorrect version in VersionNT.

If you need to know the actual version, one possible workaround is to launch your MSI as a package in a Suite/Advanced UI or Advanced UI project, and pass it a command line that includes: REALVERSIONNT=[@Platform.FullVersion]. If you just need to enable or disbale your MSI from running, you can do that with a Platform condition in the suite (either as an exit condition or an eligibility condition for the package).
0 Kudos
Roman1
Level 9

Ok. I will wait.
0 Kudos
Tiger12
Level 3

Can anyone tell me how the correct value for VersionNT in Windows 10 is now already?
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Per VersionNT and VersionNT64, the value should be MajorVersion * 100 + MinorVersion which would calculate out to 1000. However on every preview build of Windows 10 that I've seen, the value is still the same value seen on Windows 8.1: 603; see this technet thread for external confirmation.
0 Kudos
Tiger12
Level 3

Thanks for the Feedback.
I have now installed Windows 10 Enterprise x64 (Build 10240), but the value for VersionNT and VersionNT64 are still on 603 !!!
What now?
0 Kudos
Roman1
Level 9

Look at this key:

RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE );

szKey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
0 Kudos
Tiger12
Level 3

Yes, it is 6.3.
But there ist a new DWORD-Entry CurrentMajorVersionNumber with value 10.
0 Kudos
JBeauvais
Level 3

While VersionNT, VersionNT64, & GetVersionEx are returning 603 for Windows 10, you could also look at the property WindowsBuild and check if it's >= 10240. This was the official Win 10 build.

This sounds good, but WindowsBuild is returning 9600 rather than 10240. 😞
0 Kudos