IIsExtension offers the ready-made properties for this (also taken from
registry, but under the hood):
    IISMAJORVERSION - major version
    IISMINORVERSION - minor version

Thus, IIS 7.5 will be detected like:
    IISMAJORVERSION = "#7"
    IISMINORVERSION = "#5"

Hope this helps,

-- Yan


-----Original Message-----
From: John H. Bergman (XPedient Technologies)
[mailto:john.berg...@xpedienttechnologies.com] 
Sent: Thursday, December 17, 2009 18:33
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] IIS6/IIS7 Detection

How do you detect if IIS6 or IIS7 are installed?  Previously I was
looking in the registry, is there a better way?

This is how I was checking for IIS and ASP.NET 2.0, it is, however,
broken with IIS7 even with the IIS6 compatibility installed.


    <Condition Message="This setup requires the IIS windows component is
installed.">
      <![CDATA[IIS="#1"]]>
    </Condition>

    <Condition Message="This setup requires the ASP.NET 2 is configured
in IIS.">
      <![CDATA[ASPNET2]]>
    </Condition>

    <Property Id="IIS">
      <RegistrySearch Id="IISInstalledComponents" Root="HKLM"
Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OC
Manager\Subcomponents" Type="raw" Name="iis_common" />
    </Property>

    <Property Id="ASPNET2">
      <RegistrySearch Id="ASPNET2InstalledComponents" Root="HKLM"
Key="SOFTWARE\Microsoft\ASP.NET\2.0.50727.0" Type="raw" Name="Path" />
    </Property>

------------------------------------------------------------------------
------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and
easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to