COM Capturing and Self Registration

MSI databases are dynamic in their ability to monitor the state of a machine and “heal” overwritten files or registry keys.  This can only happen while script based self-registration is not used.  This point will be made often as removing self-registration is an incredibly important task of MSI editing.

Self-Registration publishes COM information from within a DLL or OCX to the Registry at installation time.  If anything should overwrite or delete the advertising information or file, Windows Installer has little or no ability to correct the errors. 

The fault tolerance and durability of Windows Installer is the dynamic, relational nature of the installer.  Script based installation techniques such as utilising the Self Registration table is strongly discouraged.

 

Removing Self Registration

Wise use a command line utility called WiseComCapture.exe that will produce a REG file from the COM contained within a DLL.  This can then be imported into a component of your choosing.

A freeware (in some ways superior) alternative is called RegSpy that may be downloaded from installsite.org

http://www.installsite.org/pages/en/msi/tips.htm

Example

1MSI Contains entries within the SelfReg table

 

2.  The application must be installed to a workstation and WiseComCapture.exe is used from the command-line.  This utility must be used specifying the full path to the problematic file.

Text Box:

 

 

 

 

The same result could be achieved through the use of Regspy (as shown below)

 

 

The produced registry file that may be imported into the appropriate component within your package.  The component will be the same hold the specified file (in this instance, fm20.dll).

Text Box:

 

 

 

3  Open the project and locate the correct component that holds the file with self-registration set.  In this particular example, it is not obvious to know which component the file belongs to so we need to check the file table.  We can tell from the file table that the file FM20.DLL belongs to the component “Global_Forms_Core”.

4Expand the component view and “Right Click” on the Registry icon for the specified component.  Select the “Import from .REG” option

Text Box:

 

5. After selecting the appropriate Registry file, opt for Registry information to be imported into the proper advertising tables.

Text Box:

6.Ensure that your remove the file entry from the SelfReg Table.