[wix-users] Registry serach and numbers

John Cooper JoCooper at jackhenry.com
Thu Mar 3 13:03:05 PST 2016


The way I do it is I write a custom action to harvest the two pieces from the registry.  I then reassemble them using the Version() constructor to set a value with the custom action.  I take a property as input with the minimal version number.  It is also converted to a true Version() so I can use it's comparison semantics.  I then make the comparison and store a "#1" in a property if the version is greater than the minimum, or I clear the property otherwise.

--
John Merryweather Cooper
Senior Software Engineer | Integration Development Group | Enterprise Notification Service
Jack Henry & Associates, Inc.® | Lenexa, KS  66214 | Ext:  431050 |JoCooper at jackhenry.com




-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Ronny Eriksson
Sent: Thursday, March 3, 2016 2:58 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Registry serach and numbers

The e-mail below is from an external source.  Please do not open attachments or click links from an unknown or suspicious origin.

Hi all

I have this condition to see if the IIS version is higher the 7.
But I have 10 and it will not recognize it as a higher number, and there for is says that I don't have IIS7 or higher installed.

This is the wix code.
<Property Id="IIS_MAJOR_VERSION">
      <RegistrySearch Id="CheckIISVersion"
                      Root="HKLM"
                      Key="SOFTWARE\Microsoft\InetStp"
                      Name="MajorVersion"
                      Type="raw"/>
    </Property>

    <Condition Message="IIS must be installed of at least IIS 7 or higher.">
      <![CDATA[Installed OR (IIS_MAJOR_VERSION >= "#7")]]>
    </Condition>

How do I solve this?
Can I convert the IIS_MAJOR_VERSION to an INTEGER or is there a better way to check the IIS version when the IIS version is higher then 9?
I understand why IIS_MAJOR_VERSION >= #7 is not true when IIS_MAJOR_VERSION is #10 since it's a string.

I'll take any idees.

/Ronny

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

NOTICE: This electronic mail message and any files transmitted with it are intended
exclusively for the individual or entity to which it is addressed. The message, 
together with any attachment, may contain confidential and/or privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or distribution 
is strictly prohibited. If you have received this message in error, please 
immediately advise the sender by reply email and delete all copies.




More information about the wix-users mailing list