[wix-users] Registry serach and numbers

Steven Ogilvie Steven.Ogilvie at titus.com
Thu Mar 3 13:00:42 PST 2016


Try this:

<?define IISCondition_Message = "$(var.ProductName) requires Microsoft Internet Information Services (IIS) 7.5 or above. Please install the pre-requisite, then restart the setup." ?>

<!-- Check for IIS -->
    <PropertyRef Id="IISMAJORVERSION" />

<!-- Check for IIS -->
    <Condition Message="$(var.IISCondition_Message)">
      IISMAJORVERSION >= "#7" OR IISMAJORVERSION = "#10"
    </Condition>

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

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/



More information about the wix-users mailing list