asif0012
Posts: 44
Joined: Tue Nov 22, 2022 6:30 pm

Rollback and uninstall doesn't completely delete the installation directory

Hello,
I am using Advanced Installer version 20.8 Enterprise Edition.

When I uninstall the application or if rollback is triggered during the installation, the installer doesn't completely delete the installation directory. Some folder exists in the installation directory even after the uninstallation or rollback is finished.


For uninstall:

If I use a custom action to delete the folder after uninstall is complete. When should be the execution time of the custom action and do I need to maintain a sequence for the custom action e.g. After the InstallFinalize stage, etc.


For Rollback:
Can the installer clean up the installation directory by using a custom action during rollback? If yes, when should be the execution time of the custom action, and do I need to maintain a sequence for the custom action e.g. After the InstallFinalize stage, etc.

Problematic Scenario for rollback:
- If the installation is canceled during the "Copying New Files" stage, then rollback custom actions don't get triggered. The installation directory doesn't get cleaned up


Suggest also if there are better ways to handle it for both uninstall and rollback.

Regards,
Asif
Liviu
Posts: 1048
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Rollback and uninstall doesn't completely delete the installation directory

Hello Asif,
Some folder exists in the installation directory even after the uninstallation
This is quite strange. The folder should be deleted after uninstalling. Can you make sure that the folder is not already present on the disk, created by another application? In this case, the folder was not installed by the installer, so it will not be removed on uninstall.

To further investigate this, can you please send us by email to support at advancedinstaller dot com the following resources:

1. the .AIP (setup project) file.
2. an installation log.
3. a download link for your setup package.
For uninstall:

If I use a custom action to delete the folder after uninstall is complete. When should be the execution time of the custom action and do I need to maintain a sequence for the custom action e.g. After the InstallFinalize stage, etc.
Folders are removed during the Remove resources standard action. You can therefore add the desired custom action after this group of actions.
remove folders.png
remove folders.png (110.7 KiB) Viewed 5788 times
For Rollback:
Can the installer clean up the installation directory by using a custom action during rollback? If yes, when should be the execution time of the custom action, and do I need to maintain a sequence for the custom action e.g. After the InstallFinalize stage, etc.
The deferred custom action can be only scheduled between InstallInitialize and InstallFinalize standard actions. You can find more details on the 3.2 Deferred custom action
article.
Problematic Scenario for rollback:
- If the installation is canceled during the "Copying New Files" stage, then rollback custom actions don't get triggered. The installation directory doesn't get cleaned up
There is no way to start the rollback if the Cancel button is pressed in the Immediately stage. Pressing the Cancel button means the execution is in the Immediately stage, thus the rollback cannot be called and the UserExit dialog will be displayed instead. This dialog appears when the user presses cancel during immediately stage.

That happens because the rollback action does not cover all the cases. It works only for the deferred stage, for the Immediately stage the rollback does not work.

Hope this helps!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”