Filtering Registry Changes for COM Extraction

InstallShield 2019 Express Edition

To prevent InstallShield from extracting undesired COM data from a COM server (either at build or design time), you can edit the Filters.xml file and specify the registry keys to be excluded. Filters.xml is in the following location:

InstallShield Program Files Folder\Support

The file must remain in this location after you edit it to ensure that COM extraction works properly.

Tip • You can also use the Filters.xml file to control which files should be included or excluded during dependency scanning. For more information, see Filtering Files in Dependency Scanners.

Excluding Registry Keys from COM Extraction

The <Exclude> element in the Filters.xml file is where you add subelements for each of the registry keys that you want the COM extraction process to exclude. Any keys that are listed here will not be uninstalled when your product is uninstalled.

By default, the <Exclude> element has subelements for common system registry keys that are required.

Specifying Registry Keys in the <Exclude> Element

If you want to list a key under the <Exclude> element, you must add the key as a registry subelement.

Following is a sample of a properly formatted registry subelement that blocks changes to an InprocServer32 registry key, all of its values, and all of its subkeys:

  <Registry key="HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000231-0000-0010-8000-00AA006D2EA4}\InprocServer32"/>

Following is a sample of a properly formatted registry subelement that blocks changes to only the default value of an InprocServer32 registry key:

  <Registry key="HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000231-0000-0010-8000-00AA006D2EA4}\InprocServer32" value=""/>

Following is a sample of a properly formatted registry subelement that blocks changes to only the ThreadingModel value name for an InprocServer32 registry key:

  <Registry key="HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000231-0000-0010-8000-00AA006D2EA4}\InprocServer32" value="ThreadingModel"/>

Recognized Attributes for the <Registry> Subelement

Attribute

Description

key

This attribute must be lowercase. The value of this attribute (for example, HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000231-0000-0010-8000-00AA006D2EA4}\InprocServer32 in the above examples) indicates the name of the registry key that you want to filter.

value

This attribute is optional:

To block changes to an entire registry key, do not include the value attribute.
To block changes to the default value of the specified key, set the value of this attribute to a null value.
To block changes to the name of a value of the specified key, set the value of this attribute to the name of that registry value.

Any other attributes for the <Registry> subelement are optional and are not recognized by the COM extraction process. You may want to add additional attributes to identify why an item is being excluded.

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.

  -->

 </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" />

 </Exclude>

</Filters>