0

I need to Cancel uninstallation when my custom action is failed. However i am unable to cancel uninstallation, may i know what is my mistake?

<CustomAction Id="SetRemoveSettings" FileKey="RemoveSettings.exe"  ExeCommand="" Execute="deferred" Return="check" HideTarget="no" Impersonate="yes" />
<InstallExecuteSequence>
  <Custom Action='SetRemoveSettings' Before='InstallFinalize'>REMOVE="ALL"</Custom>
</InstallExecuteSequence>
Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
san louise
  • 21
  • 2

1 Answers1

0

It should rollback the uninstall if your EXE returns a non zero exit code.

Also, you should look into the Quiet Exec Custom Action pattern. It's a better way of calling EXE's for those times that you must call an EXE. Otherwise avoid EXE's in general.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100