Question

I have a C++ activex control that I need to make an installer for. It needs to drop the dll and make some registry keys.

I have about 6 .RGS files which I made for self-registration via regsvr32, which work.

To do an installer I am manually porting the RGS scripts into the visual studio 2008 windows installer registry GUI. I feel like its not possible to do an exact port (e.g. RGS keywords like ForceRemove).

Isn't there a way to generate these files from the IDL file? Am I doing this wrong?

Was it helpful?

Solution

SelfReg is not a best practice in an MSI install because it's out of process and fragile. Visual Studio 2008 Installers are limited but you should be able to set the Register property to vsdrfCOM instead of vsdrfCOMSelfReg. This will cause the COM meta data to be harvested from your DLL and authored natively in MSI.

After you build your MSI, you should notice the SelfReg table is empty and a serious of automatically authored rows in the Registry table for you COM data.

Note: VDPROJ is kind of flakey at extracting this COM so it may not work. You might have to consider a stronger tool such as InstallShield or Windows Installer XML.

OTHER TIPS

You are doing it wrong. The .rgs files are there so that the component can install itself. Any installer supports letting a component install itself. A Visual Studio Setup project for example, set the Register property.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top