[wix-users] Windows 10 Identification During Install
osito at live.com
Thu Oct 19 01:17:55 PDT 2017
“Identifying the current operating system is usually not the best way to determine whether a particular operating system feature is present. This is because the operating system may have had new features added in a redistributable DLL. Rather than using the Version API Helper functions to determine the operating system platform or version number, test for the presence of the feature itself.”
“Bonus chatter: Note that the operating system version check does raise its own question: "Why are you doing an operating system version check at all?" Because that sort of thing gives the application compatibility team the heebie-jeebies. We asked, but the customer never did answer that question.”
There's several more…
Sent from my Windows 10 phone
From: Jason Beck via wix-users<mailto:wix-users at lists.wixtoolset.org>
Sent: Thursday, October 12, 2017 11:17 AM
To: wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>
Cc: Jason Beck<mailto:mrbass21 at gmail.com>
Subject: Re: [wix-users] Windows 10 Identification During Install
Is there somewhere this is listed as a "bad practice"?
The VersionNT property itself says: "Conditional statements that depend
upon the operating system can use this property."
Everything I have seen or learned about WiX for conditional component
installs uses it the way you did at the end of your email (<Condition>
I don't see why you think you're not supposed to use it.
Unless someone replies back and gives justification for why you
shouldn't use VersionNT (which I would need to know for our product),
On 10/12/2017 1:08 PM, Marc Beaudry via wix-users wrote:
> Hello Everyone,
> Windows 10 required attested drivers, causing me to have two sets of drivers, one for Windows 10 and a second set of all OSes prior to Windows 10 but greater or equal to 7.
> I have searched and found different solutions to my issue, but I can't believe this is how installers work, so I would like the opinion of someone else that has more experience than I on this matter.
> --- VersionNT and VersionNT64: When I run an MSI with Verbose logging I get VersionNT = 603 on Windows 10 and on Server 2012.
> I know VersionNT is a private property and should not be used, I was simply experimenting.
> --- Next option was a CA using C#: OperatingSystem os = System.Environment.OSVersion;
> This too returns 6.X
> --- Next Option was a CA in C++. GetVersion or GetVersionEX
> This too returns 6.X
> For this to report the correct version it requires a modified application manifest file. I do not have an application, so this doesn't work in my scenario.
> All my installer has is a CA.DLL
> --- Next option is to use the Version Help Functions in a CA: IsWindowsVersionOrGreater()
> I have two different version of Windows 10 on my test bench.
> This does not work on my older version of Windows 10, this is the first release of 10.
> The one that works on my Windows 10 is IsWindows8OrGreater, which makes no sense.
> Now on the windows installer side of things how can I correctly identify the OS I am installing on is Windows 10 or Greater??? (IE Servier 2016 as an example)
> Asked differently is there a native Windows Installer way of Identifying that the installation OS is 10 or greater
> I have this condition, which I know is not good practice as I am using VersionNT, this does not work on Server 2012 and it expects Windows 7 architecture for Drivers.
> <Condition> <![CDATA[VersionNT>602]]></Condition>
> Thanks for your help and wisdom,
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users