Filtering IIS Data When Importing a Web Site and Its Settings into an InstallShield Project

InstallShield 2016

Edition • The ability to import IIS data into an InstallShield project is available only in the Premier edition of InstallShield.

Project • This information applies to the following project types:

Basic MSI
DIM
InstallScript
InstallScript MSI
Merge Module

When you use an XML file that is generated by the IIS scanner to import an IIS Web site and its settings into the Information Services view, you may find that certain IIS settings are imported, even though you do not need them to be configured in your installation. To avoid having these settings configured every time that you use an XML file to import IIS settings, you can edit Filters.xml. This file enables you to specify any IIS settings that you want the import to ignore.

Filters.xml is in the following location:

InstallShield Program Files Folder\Support

The file must remain in this location after you edit it; otherwise, the IIS import will not work properly.

Tip • You can also use the Filters.xml file to control which registry items should be excluded during COM extraction. For more information, see Filtering Registry Changes for COM Extraction.

The Filters.xml file also lets you control which files should be included or excluded during dependency scanning. For more information, see Filtering Files in Dependency Scanners.

Excluding IIS Data

The <Exclude> element in the Filters.xml file is where you add subelements for each of the IIS items (Web sites, applications, virtual directories, and application pools) that you do not want to be imported. You can also add subelements for each of the IIS settings that you do not want to be imported. Any items and settings that are listed here will not be added to the Internet Information Services view of your project.

Examples for Specifying IIS Data in the <Exclude> Element

To prevent an application pool named TestAppPool from being imported into the Internet Information Services view, add the following line within the <Exclude> element.

  <IisScanItem name="TestAppPool" type="4"/>

The type is required. The following table shows the available IIS item types:

Recognized Attributes for the type Attribute of the <IisScanItem> Subelement

Attribute Value

Description

1

Web site

2

Application

3

Virtual directory

4

Application pool

To prevent an IIS setting with a specific value from being imported into the Internet Information Services view, add the following line within the <Exclude> element.

  <IisScanProperty name="PropertyName" value="PropertyValue"/>

If this line is within the <Exclude> element, InstallShield blocks a setting named PropertyName with a value that equals or contains PropertyValue.

Note • The property names and values are not Windows Installer properties and values. They are abbreviations for the names and values of settings that InstallShield lets you configure in the Internet Information Services view.

Important • Ensure that your XML code is well formed; if its not well formed, all of the filters fail. In most cases, you can identify improperly formed XML code by opening the Filters.xml file in Internet Explorer. You should be able to expand and contract the <Filters>, <Include>, and <Exclude> elements; if you cannot, check the code for errors.

If you add subelements to the <Exclude> or <Include> elements, be sure that you do not place them within the commented-out section, since InstallShield ignores that area of the Filters.xml file.

The following sample XML code shows the format of the Filters.xml file:

<Filters>

 <Include>

  <!--Instructions on how to add files to this element.

  -->

  <File name="mfc42.dll" We="needthis"/>

 </Include>

 <Exclude>

  <!--Instructions on how to add files to this element.

  -->

  <Registry key="HKEY_CLASSES_ROOT\Interface\{00020404-0000-0000-C000-000000000046}"/>

  <File name="12520437.cpx" path="[SystemFolder]" wrp="4.0-10.0" />

  <File name="12520850.cpx" path="[SystemFolder]" wrp="4.0-10.0" />

  <IisScanProperty name="AppMappings" value="*;;*;0" />

  <IisScanProperty name="CustomErrors" value="C:\WINDOWS\help\iisHelp\common" />

 </Exclude>

</Filters>

See Also