I created a COM component that is distributed through the MSI created by WIX.
The COM component has a rather complex and non-stationary registration logic, which means that embedding the registration information directly into the Windows Installer WXS file is not a valid option - registration must be done with regsvr32- and this is 32-bit COM, so it must use the 32-bit version regsvr32.exe- %SystemRoot%\SysWow64\regsvr32.exeon 64-bit Windows or %SystemRoot%\System32\regsvr32.exeon x86 Windows.
I noticed two problems with WIX with this WXS XML:
<InstallExecuteSequence>
<Custom Action="COMRegister" After="InstallFinalize">NOT Installed</Custom>
<Custom Action="COMUnregister" After="InstallInitialize">Installed</Custom>
</InstallExecuteSequence>
<CustomAction Id="COMRegister" Directory="APPLICATIONROOTDIRECTORY" ExeCommand='regsvr32.exe /s "[APPLICATIONROOTDIRECTORY]Component.dll"' />
<CustomAction Id="COMUnregister" Directory="APPLICATIONROOTDIRECTORY" ExeCommand='regsvr32.exe /s /u "[APPLICATIONROOTDIRECTORY]Component.dll"' />
- The wrong one is called
regsvr32.exe. I noticed that the x64 version resgvr32.exeran on 64-bit systems instead of the 32-bit version. regsvr32.exe , COM E_ACCESSDENIED.
1. , regsvr32.exe [WindowsFolder]\SysWOW64\regsvr32.exe, 32- , SysWow64 .
2. , After="InstallFinalize" to After = "RemoveExistingProducts" would cause it to run with elevated permissions, however instead this just gives me errors about RemoveExistingProducts ` .
?
Update
( 2 , , WIX H.P. Lovecraft)
, , 32- , WOW, 32- regsvr32.exe .
, : CustomAction (, , ) :
<Custom/>" must have Before = "InstallFinalize" , and **not** After = "any other values for Before =" " ` , WIX Windows (wut).<CustomAction /> :Execute="deferred"Impersonate="off"
, 32- regsvr32.exe. ?