PDA

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



Roman1
06-12-2015, 12:56 AM
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 ?

MichaelU
06-12-2015, 06:18 AM
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).

Roman1
06-12-2015, 06:22 AM
Ok. I will wait.

Tiger12
07-20-2015, 02:19 AM
Can anyone tell me how the correct value for VersionNT in Windows 10 is now already?

MichaelU
07-20-2015, 08:42 AM
Per VersionNT (https://msdn.microsoft.com/en-us/library/aa372495.aspx) and VersionNT64 (https://msdn.microsoft.com/en-us/library/aa372497.aspx), 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 (https://social.technet.microsoft.com/Forums/en-US/1c8be9b3-a8be-4070-b8e9-51f3c5448c5c/windows-10-msi-installer-sets-versionntversionnt64-to-603-should-be-1000?forum=WinPreview2014General) for external confirmation.

Tiger12
07-29-2015, 04:55 AM
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?

Roman1
07-29-2015, 05:05 AM
Look at this key:

RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE );

szKey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";

Tiger12
07-29-2015, 05:15 AM
Yes, it is 6.3.
But there ist a new DWORD-Entry CurrentMajorVersionNumber with value 10.

JBeauvais
08-06-2015, 06:27 PM
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. :(