0
votes

There is windows installer based on Wix which is not implemented correctly and it has several custom action that should not be executed in uninstallation (msi & msp). I'm going to add custom action to restart system (by using powershell) in the middle of patch uninstallation process (windows installer uninstalled everything). It looks like the process finalized successfully and the patch uninstalled and application works fine.

  1. Are there any risks to do it?
  2. Are there any flags to set in wix file to resume uninstallation after rebooting?
1

1 Answers

0
votes

This sounds potentially dangerous - not sure what happens to MSI when you force reboot out of the blue (there are standard ways to invoke reboots instead).

Generally you should be able to fix anything wrong inside the MSI by patching it with a minor upgrade first and then run the fixed uninstall sequence. (this is because the installation of a minor upgrade does not trigger the existing package's uninstall sequence): MSI cleanup approaches (for broken uninstalls) (older answer).

Is there any reason why this approach would not work? Then you should not need any dangerous rebooting, but let Windows Installer do the rebooting itself.

There are advanced features to deal with reboots in MSI, but it is never a good thing to invoke (undesired complexity) and it needs lots of testing. Avoid if you can. You can call the ScheduleReboot action with proper conditioning and the MSI will trigger a reboot warning or a direct reboot if run in silent mode.

Please provide more details of what is happening in your setup.