MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: .NET Framework Installed?[Next]: MDAC not too old?
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Tips and Tricks->Launch Conditions->IIS Installed?

Launch Condition: IIS Installed?

The following demonstrates how an MSI could check to see if IIS is installed (checks for the existance of a particular registry value):

#(
    ;--- Look for a service registry value ----------------------------------
    <$RegistryRead
         Property="IISINSTALLED4CONFIG"
             HKEY="LOCAL_MACHINE"
              KEY="SYSTEM\CurrentControlSet\Services\W3SVC"
             NAME="DisplayName"
        Condition="not Installed"
          Default="NoIIS"
    >
#)
#(
    <$AbortIf
        condition=^IISINSTALLED4CONFIG = "NoIIS"^
          Message=^The install of "<$ProdInfo.ProductName>"
                   version <$Productversion> can't continue as it
                   requires IIS (and IIS isn't installed on this machine).^
              Seq="AppSearch-"
              SeqTable="InstallUISequence InstallExecuteSequence"
    >
#)


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: .NET Framework Installed?[Next]: MDAC not too old?


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Saturday December 09 2017 at 9:30am
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.