问题
We, at Microsoft, had been using WIX toolset version 3.5.2519.0 for so long to build the installer and patches for our product named (System Center Service Manager aka SCSM). Recently we need to update to WIX Toolset 3.14.0.1703 as this version has support for TLS1.2.
Building our project with WIX Toolset 3.14.0.1703 went fine, but while installing it, I am getting the below error:
Then I built the product one by one with all the WIX versions, and here are the results:
Product built with WIX ToolSet Version 3.8 and lower ar fine and installer worked fine.
But with ToolSet 3.9 and above, installer is getting failed with error: An error occurred while executing a custom action RegisterComPlus
Snippet of the logs: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Action start 21:11:37: RegisterTypeLibraries.
MSI (s) (48:B0) [21:11:37:585]: Doing action: SelfRegModules
Action ended 21:11:37: RegisterTypeLibraries. Return value 0.
Action start 21:11:37: SelfRegModules.
MSI (s) (48:B0) [21:11:37:588]: Doing action: RegisterComPlus
Action ended 21:11:37: SelfRegModules. Return value 1.
MSI (s) (48:B0) [21:11:37:589]: Note: 1: 2205 2: 3: Complus
MSI (s) (48:B0) [21:11:37:589]: Note: 1: 2228 2: 3: Complus 4: SELECT ComponentId
, FileName
, Component
.Directory_
, ExpType
, Component
.Action
, Component
.Installed
FROM Complus
, Component
, File
WHERE Complus
.Component_
= Component
AND Component
.KeyPath
= File
.File
AND (Action
= 1 OR Action
= 2)
Action start 21:11:37: RegisterComPlus.
MSI (s) (48:B0) [21:11:37:591]: Note: 1: 2265 2: 3: -2147287035
MSI (s) (48:B0) [21:11:37:591]: Machine policy value 'DisableRollback' is 0
MSI (s) (48:B0) [21:11:37:592]: Note: 1: 1402 2:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
Action ended 21:11:37: RegisterComPlus. Return value 0.
MSI (s) (48:B0) [21:11:37:592]: Note: 1: 1402 2:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (48:B0) [21:11:37:592]: No System Restore sequence number for this installation.
MSI (s) (48:B0) [21:11:37:592]: Unlocking Server
MSI (s) (48:B0) [21:11:37:602]: Note: 1: 2717 2:
_Set_Rollback_RemoveCodeGroup.1CA03A32_06E0_4726_8E63_FEA4484D9D6F DEBUG: Error 2717: Bad action condition or error calling custom action '_Set_Rollback_RemoveCodeGroup.1CA03A32_06E0_4726_8E63_FEA4484D9D6F'.
MSI (s) (48:74) [21:11:37:622]: I/O on thread 720 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 1244 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 3392 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 928 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 680 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 4528 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 2156 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 2316 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 3980 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 5172 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 2724 could not be cancelled. Error: 1168
MSI (s) (48:B0) [21:11:37:622]: Product: Microsoft System Center Service Manager -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2717. The arguments are: _Set_Rollback_RemoveCodeGroup.1CA03A32_06E0_4726_8E63_FEA4484D9D6F, ,
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2717. The arguments are: _Set_Rollback_RemoveCodeGroup.1CA03A32_06E0_4726_8E63_FEA4484D9D6F, , Action ended 21:11:37: INSTALL. Return value 3. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Are there any changes taken in WIX Toolset 3.9 and above is breaking my installer? Any resolution for this?
Please let me know in case any more info is required on it.
Thanks, Rajeev
回答1:
Hmm, no suggestions so far. This will not be an answer, but some suggestions to try to get you going helping yourself. This happens all too often for deployment questions since they are hard to debug or determine what is going on with the limited information available.
It looks to me like this might not be a COM+ problem since it looks like that custom action completes OK:
Action ended 21:11:37: RegisterComPlus. Return value 0.
Let's maybe try a few long-shots. Bear with me since a lot of this will be a bit out there. Torpedos. Full spread and all that :-) (run for cover):
Comparative Misery - :-): I might compare the working MSI and the new MSI using the compare approaches found here. I don't think you will find a lot, but should probably be done. Compare MSIs directly and decompile using dark.exe? The latter makes little logical sense, but I want to see if something has changed in how WiX links the MSI.
Eliminate Complexity: I like to take out complex parts and see if the rest of the setup installs OK. This can be a real waste of time, but sometimes illuminates.
I would take out that merge module that adds that custom action and verify that the rest of the package installs as expected. Sometimes this doesn't work if there is high coupling going on for the custom actions (obviously).
You can also set a condition for some custom actions to
0
. This should prevent the custom action from running. You can addAND 0
if there is an existing condition.
Disable Rollback?: Another long-shot. Disable MSI rollback and try a test install on a clean virtual? Just to see if problems are in the rollback custom actions. I would use the DISABLEROLLBACK property to disable rollback. Note that disabling rollback is no solution though! (has to be mentioned for others who find this).
Custom Action Source Access: If you have access to the custom action source code I would try to debug interactively using Visual Studio as described here: Debug C# Custom Actions. You compile the code in debug mode (so you have debug dll's in your MSI - be sure to not include those accidentally for public release!) and show a message box from the custom action, then you attach the Visual Studio debugger and step through the code. For native code attach to
msiexec.exe
, for managed code attach torundll32.exe
.
来源:https://stackoverflow.com/questions/52817451/error-occurred-with-custom-action-registercomplus-with-wix-3-9-and-above