Hello,
In order to achieve that, you can proceed as it follows:
- add the executable file in the
"Files and Folders" page
- in the
"Custom Actions" page, add a custom action that will launch your .EXE file (e.g. the
"Launch File" custom action)
- under the
"Execution Stage Condition" section, uncheck the
"Install" and
"Maintenance" option (leave only the
"Uninstall" option)
This way, the custom action will only be executed during uninstall.
Additionally, depending on the point in time when you want the custom action executed, you might need to add the executable file as a
"Temporary File" and check the
"Do not remove file when setup ends" option for it.
During the uninstall process, at some point, the files installed by your setup will be deleted as well. If you want to execute the custom action after that point, the file will no longer exist on the machine and the custom action will fail. This is why the above step is necessary.
Hope this helps.
Best regards,
Catalin
FOLLOW US
Get the latest news in Application Packaging