Our WebSetupProjects (created in VisualStudio 2010) fail to properly detect version of IIS on Win10.
My thought is that it has to do with the way how this condition is spelled out - note the double-quotes:
(IISMAJORVERSION >= "#5" AND IISMINORVERSION >= "#1") OR IISMAJORVERSION >= "#6"
so even though registry check in HKLM\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters
for MajorVersion
and MinorVersion
returns dword-integer values, they are being coerced into string representation, therefore resulting in "10" being less than "5" or "6" - thus failing the check.
I haven't tried removing double-quotes yet, but am afraid they may be there for a reason (i.e. without them the check won't work properly). Still, will attempt this once i get a chance, and will report on it.
In the meantime, has anyone encountered the same scenario and found how to solve it?
Unfortunately there is no nice way to do it. You could change the condition like this:
((IISMAJORVERSION >= "#5" AND IISMINORVERSION >= "#1") OR IISMAJORVERSION >= "#6") OR IISMAJORVERSION = "#10"
The problem is that you would have to update the condition with every new release of Windows.
Maybe you should consider migrating your setup projects to WIX, since setup projects are no longer supported by Microsoft. Using WIX you can implement a custom action to programatically check for the required version of IIS, reading it from the registry and casting it to an integer before comparing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With