[wix-users] Registry serach and numbers

Ronny Eriksson ronny.eriksson at optimity.se
Sat Mar 5 07:35:00 PST 2016


Hi again

I just realised that it works...

Thanks again.

Ronny Eriksson| Optimity| +46 70 680 98 32 | Skype: ronnye75 | www.optimitysoftware.com 
IMPORTANT - This e-mail and any attachments may be confidential and privileged. If received in error, please contact us and delete all copies. Before opening or using attachments, check them for viruses and defects. Our liability is limited to re-supplying any affected attachments. Any use or dissemination of its contents in any forms by anyone other than the addressee is prohibited. 


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steven Ogilvie
Sent: den 3 mars 2016 23:10
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Registry serach and numbers

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

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

You don't need to checks (conditions) just one...

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

Not a problem, i already hade that reference.
But somehow it does not like the version 10.
I even tried to set it to only = "#10" and = "#1" but I still get that it will be a false statement.
Like this
<Condition Message="IIS must be installed of at least IIS 7 or higher.">
      <![CDATA[Installed OR (IIS_MAJOR_VERSION = "#10")]]> </Condition> Or like you do it
    <Condition Message="$(var.IISCondition_Message)">
      IISMAJORVERSION = "#10"
    </Condition>
And that results in a false statement and I can't install...

To me this look like some bug but I don't understand why it should bug out just because it is a double digit value?

Anyway, for the moment I'll have to go with the Custom Action approach but if anyone have a solution for the other approach please let me know.

Thanks for the help Steven and John.

Ronny 

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steven Ogilvie
Sent: den 3 mars 2016 22:42
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Registry serach and numbers

Oops forgot to add, you need to add the reference to the WiX WixIIsExtension extension

Steve

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

Sorry but I tried that and it didn't work.
I didn't get any message and it skipped directly to End failed dialog.

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

And got the same problem...
I'll try Johns ide of a Customer Action.

It would have been nice with a Property like "WIX_IS_NETFRAMEWORK_45_OR_LATER_INSTALLED" so you don't have to compare to a number since it's not very practical to conpair numbers in strings.

Ronny 

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steven Ogilvie
Sent: den 3 mars 2016 22:01
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Registry serach and numbers

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/

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

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

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

____________________________________________________________________
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 mailing list