ISWIX, LLC View Christopher Painter's profile on LinkedIn profile for Christopher Painter at Stack Overflow, Q&A for professional and enthusiast programmers

September 25, 2008

HOWTO: Use Regsvr32.exe with WIX

I was surfing the blogosphere tonight when I came across this interesting blog from a Microsoft employee developer using WiX demonstrating how to use an EXE custom action to call Regsvr32:

For those of you who don’t recognize this dll, its a required library by Add-in Express, we are using it to ease our development of GhotIt (http://www.ghotit.com) plug-in(s) for Microsoft Office applications.

Now I'm currently too tired to give another `don't believe what you read` article so I'll just leave at where are the setup police when we need them?

1 comment:

Christopher Painter said...

I'm a little less tired now so here are a few thoughts on how it should be done for someone who was asking:

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.