I highly recommend using the Wix Heat.exe tool to collect all the data needed to register the lump, and then link to the fragment in the .wxs file as follows:
<ComponentGroupRef Id="FooBar.dll" />
Or include it in your .wxs file as follows:
<?include FooBar.dll.wxi?>
This method gives you complete control over what happens during the registration / unregistration of the Com component.
However, you can use Regsvr32 in a Wix project. But it relies on the correct implementation of the RegisterServer / UnregisterServer functions in the COM component
<CustomAction Id="RegisterFooBar" Directory="INSTALLDIR" ExeCommand='regsvr32.exe /s "[INSTALLDIR]FooBar.dll"'> </CustomAction> <CustomAction Id="UnregisterFooBar" Directory="INSTALLDIR" ExeCommand='regsvr32.exe /s /u "[INSTALLDIR]FooBar.dll"'> </CustomAction>
Then add your action to the installation sequence.
<InstallExecuteSequence> <Custom Action="RegisterFooBar" After="InstallFinalize">NOT Installed</Custom> <Custom Action="UnregisterFooBar" After="InstallFinalize">REMOVE="ALL"</Custom> </InstallExecuteSequence>
A.Game
source share