How to use WiX to register a DLL to install a COM message

I want to use regasm.exe to register DLL.net as a COM object. I am having an issue where intstaller is not working. I believe that due to the fact that the file that I want to register did not end up in the installed directory by the time I want to run the command. But the error log does not say an installation error so I know. Any ideas how to make sure the file is moved to "program files" before running the custom command?

This is what I am using:

  <InstallExecuteSequence>
    <Custom Action='comReg' After='InstallFinalize'>NOT REMOVE</Custom>
    <Custom Action='comUnreg' Before='RemoveFiles'>REMOVE</Custom> 
  </InstallExecuteSequence>

  <CustomAction Id='comReg' Directory='INSTALLDIR' 
 ExeCommand='"[WindowsFolder]Microsoft.NET\Framework\v2.0.50727\regasm.exe" "[INSTALLDIR]my.dll"' Return='check' />

  <CustomAction Id='comUnreg' Directory='INSTALLDIR' ExeCommand='"[WindowsFolder]Microsoft.NET\Framework\v2.0.50727\regasm.exe" /u "[INSTALLDIR]my.dll"' Return='check' />

      

+2


source to share


1 answer


Why would you want to do that? You will lose all rollback that will ensure the registration in the appropriate MSI tables. Also, with this planning, you will have problems with magnification.



I highly recommend using heat.exe to capture the regression of your assembly and take a declarative approach.

+5


source







All Articles