The easiest way (and Rob M to rant and scold about how this is wrong) is to simply use SelfRegCost=1 in the File tag for the DLL.
This is incorrect, because we must explicitly control the registration of the DLL, not allowing it to simply run arbitrary code through the DllRegisterServer. The theory is that a DLL should not do anything but put the appropriate entries in the registry when calling DllRegisterServer. Unfortunately, many of them do more, so self-registration may be the only way to get your installation to work.
This is also wrong, because it means that the Windows installation system does not know anything about these registry keys, and what should and should not be. This means that the repair will not work, and perhaps its removal will not be properly cleaned, etc.
Otherwise, you can create the appropriate WiX code by specifying heat.exe in your DLL and integrating its output into your current WiX project. You will get many Class, ProgID, TypeLib, and Registry tags. You may need to manually edit this output to compile it.
I hope this helps.
Troy Howard Dec 12 '08 at 21:31 2008-12-12 21:31
source share