Windows installer – Reverse engineering COM self registration for a .exe COM server.

There are a couple compelling reasons to capture the self registration of COM components inside Windows installer tables instead of allowing windows installer to register the component through registration calls.

– It allows the installer to be more consistant and truly contain a pre-and post install snapshot of the system
– Allows the install / uninstall to be transactional
And most importantly; allows the installer to install components per/user, so that non-admins can register components.

The most difficult part of this effort is to capture these registry settings so they can be added to the installer tables. WIX (the tool we are using with attassa/collabomatic) comes with a tool called Tallow. This receives .reg files as well as dll’s and derives the registration settings for the files in the form of wix fragment. This works great for dll’s but unfortunately it doesn’t work so hot for .exe COM servers.

For this, I use the following process (using regcap.exe from a dos prompt).

DOS: Regcap.exe /o component.reg component.exe

DOS: tallow.exe –reg component.reg > component.wxs

This produces the components fragment file that just requires a few touches before it’s merged into our main installer using light.

One thought on “Windows installer – Reverse engineering COM self registration for a .exe COM server.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s