InstallShield 2016
Project • This information applies to the following project types:
• | Basic MSI |
• | DIM |
• | InstallScript MSI |
• | Merge Module |
At run time, you can have your installation detect if the IIS Metabase and IIS 6 Configuration Compatibility feature is installed on a target system, or if IIS 6 or earlier is installed. Depending on the requirements for your product and the results of that detection, you may want the installation to exit and display an error message.
For example, Web service extensions can be installed on systems that have IIS 6. On systems that have IIS 7, Web service extensions can be installed only if the IIS Metabase and IIS 6 Configuration Compatibility feature is installed. Thus, you might want to configure your installation to verify that IIS 6 is present or the IIS 6 compatibility feature is installed; if either of those conditions are false, the installation would exit and display an error message.
InstallShield includes a sample Windows Installer DLL file that detects if either of the following are true:
• | The target system has IIS 7 and the IIS Metabase and IIS 6 Configuration Compatibility feature is installed. |
• | The target system has IIS 6 or earlier. |
Release and debug versions of the DLL file, as well as the Visual Studio 2008 C++ project that was used to create the file, are installed to the following location:
InstallShield Program Files Folder\Samples\WindowsInstaller\Detect IIS6 Compatibility
To use the Windows Installer DLL file in your project, you first need to create a custom action that calls the DetectIIS6Interfaces function in the DetectIIS6Compat.dll file.
To add a custom action that checks for the IIS Metabase and IIS 6 Configuration Compatibility feature and for IIS 6 and earlier:
1. | In the View List under Behavior and Logic, click Custom Actions and Sequences (in Basic MSI or InstallScript MSI projects) or Custom Actions (in DIM or Merge Module projects). |
2. | In the center pane, right-click the Custom Actions explorer, point to New MSI DLL, and click Stored in Binary table. InstallShield adds a new custom action. |
3. | Change the name of the action to something like DetectIIS6Interfaces. |
4. | Configure the custom action’s settings in the right pane: |
• | In the DLL Filename setting, specify the path to the DetectIIS6Compat.dll file. The typical path is: |
<ISProductFolder>\Samples\WindowsInstaller\Detect IIS6 Compatibility\DetectIIS6Compat.dll
• | In the Function Name setting, enter the following name: |
DetectIIS6Interfaces
• | In the In-Script Execution setting, select Immediate Execution. |
• | Schedule the custom action as needed by selecting the appropriate option in one or more sequence settings. |
If the IIS Metabase and IIS 6 Configuration Compatibility feature is installed or the target system has IIS 6 or earlier, the Windows Installer property ISIISMETABASECOMPATPRESENT is set to a value of 1. If the target system has IIS 7 or later and the compatibility feature is not installed, the property is not set.
You can use the ISIISMETABASECOMPATPRESENT property in conditional statements. For example, if your product cannot be used on a system without the IIS Metabase and IIS 6 Configuration Compatibility feature or IIS 6 or earlier, enter the following conditional statement in the Install Condition setting of the General Information view:
ISIISMETABASECOMPATPRESENT
As an alternative, you can create an error custom action. At run time, an error would be displayed if the condition for that custom action is true. Thus, if your product cannot be used on a system without the IIS Metabase and IIS 6 Configuration Compatibility feature or IIS 6 or earlier, use the following condition for an error custom action:
Not ISIISMETABASECOMPATPRESENT
If you have a component that should be installed only on systems that have the IIS Metabase and IIS 6 Configuration Compatibility feature or IIS 6 or earlier, enter the following conditional statement in the Condition setting of the Components view:
ISIISMETABASECOMPATPRESENT=1
See Also
Version-Specific Information for IIS Support in InstallShield
Determining Which Version of IIS Is Installed
InstallShield 2016 Help LibraryAugust 2016 |
Copyright Information | Flexera Software |