I am currently having issues when cancelling a installation. When a user installs our software and cancels the installation while files and folders are copied, there are some leftover folders after the installation rollback. I used the uninstall cleanup wizard to make some settings on the folders that are left after cancelling the installation, but it did not help.
Is there any way to make sure that if a user cancels the installation process, that everything in the APPDIR is deleted? Did anyone else run into this kind of behavior?
One workaround I thought about was using a .bat script that deletes the whole APPDIR folder when the user presses the "Finish" button on the last dialog after cancelling the installation. But I actually could not get a custom action that does this to work, calling the script always resulted in an error. Maybe I am confusing the different stages of the installer.
I added my .bat file as a temporary ressource:

I created a custom action to execute the file and pass the APPDIR:

I wanted to call the custom action when pressing the "Finish" button on the user exit dialog:

The content of my script:
Code: Select all
del /s /f /q %1
for /f %%f in ('dir /ad /b %1') do rd /s /q %1\%%fThank you for any help or suggestions!
FOLLOW US
Get the latest news in Application Packaging