views:

1409

answers:

2

I have been trying to determine a best case solution for registering a COM server using WiX to create a Windows Installer package and am struggling.

In this post http://blog.deploymentengineering.com/2008/09/howto-use-regsvr32exe-with-wix.html there is an open request for the "Setup police" to crack down on using regsvr32 through an exe custom action. I know the evils of using regsvr32 as it registers to the system rather than the user, but I also recall that OleSelfRegister can have issues from a microsoft support bulletin (sorry, can't find the link) - and I believe they recommended using regsvr32.

Any advice?

+2  A: 

Read "Do not use the SelfReg and TypeLib tables" at:

http://msdn.microsoft.com/en-us/library/bb204770(VS.85).aspx

For WiX, take a look at the Component element in the schema reference at:

http://wix.sourceforge.net/manual-wix2/wix_xsd_component.htm

Take notice of certain child elements such as AppID, Class, ProgID, Registry and so on. The proper technique is to use COM extraction to reflect the registration information and emit it declaratively into your installer so MSI can take care of it for you without going out of process to some code ( DllRegisterServer() ) that could fail and also not provide MSI insite into the footprint of the component from a repair and advertisement perspective.

+2  A: 

There is a tool "Tallow" included with Wix. You can use it to generate correct registry entries automatically. Then you just configure your wix installation to write those entries. Selfreg should not be used.

abababa22
for reference: tallow is no longer part of wix. As of wix3, it has been replaced by heat.exe.
Wim Coenen
Heat does not generate any registry values for a ActiveX exe server, So this answer is wrong
trampster