[wix-users] Bundle uninstaller quits silently (Uninstalling a MSI package directly v.s uninstalling from a bundle)
Shuai Lin
linshuai2012 at gmail.com
Tue Jun 25 08:11:57 PDT 2019
Hi all,
We have a wix bootstrapper bundle, which includes a chain of a MsiPackage
and some other helper ExePackage. Recently I have observed a weird behavior.
Some background:
0. Burn v3.11.1.2318, Windows v10.0 (Build 17763: Service Pack 0)
1. The bundle wxs:
<Chain>
<MsiPackage Id="MyAppPrograms"
SourceFile="inputs\myapp.msi"
DisplayInternalUI='no'
Permanent="no">
</MsiPackage>
<ExePackage SourceFile="myhelper.exe"
.... >
</ExePackage>
</Chain>
2. The MSI package has a custom action (type is ExeCommand). The action
would fail - exit with code 1 rather than 0 due to a bug of the
application code, but it should't matter since we have Return="ignore", as
you can see below.
<CustomAction Id="StopMyApp" FileKey="myapp.exe"
ExeCommand="--stop"
Execute="immediate"
Impersonate="yes"
Return="ignore" />
<Custom Action="StopMyApp" Before="InstallValidate">
UPGRADINGPRODUCTCODE OR WIX_UPGRADE_DETECTED OR (REMOVE="ALL")
</Custom>
The thing that has been puzzling me for the last few days is:
* If I uninstall the bundle from the control panel, the uninstaller would
fail silently: the bundle uninstaller UI just exits in the half way,
without any prompts. (But if I uninstall the bundle again it would complete
the uninstall successfully).
* In contrast, if I uninstall the MSI directly from command line with
"msiexec /x{guid-of-msi}", then the MSI could be uninstalled successfully.
I collected the logs for both methods:
- Logs when uninstalling the MSI directly with "msiexec /x" (which could
succeed):
[...]
Action ended 3:35:10: MigrateFeatureStates. Return value 0.
MSI (s) (10:80) [03:35:10:067]: Doing action: StopMyApp
Action start 3:35:10: StopMyApp.
CustomAction StopMyApp returned actual error code 1 but will be
translated to success due to continue marking
Action ended 3:35:11: StopMyApp. Return value 1.
MSI (s) (10:80) [03:35:12:005]: Doing action: InstallValidate
Action start 3:35:12: InstallValidate.
[...]
- Logs when uninstalling the bundle (which would fail):
[...]
Action ended 3:26:20: MigrateFeatureStates. Return value 0.
MSI (s) (E4:80) [03:26:20:091]: Doing action: StopMyApp
MSI (s) (E4:80) [03:26:22:623]: Doing action: InstallValidate
[...]
[As you can see, in this case there is no logs of "Action start"
"Action stop" ever after the StopMyApp action is reached]
My questions is:
1. From the perspective of the MSI, is there any difference between
uninstalling it directly v.s uninstalling it as part of a bundle?
2. How could the bundle uninstaller just quit silently without any prompt /
dialog? Could it be a bug of wix?
Any thoughts?
Regards,
Shuai
More information about the wix-users
mailing list