ChrisGue
Posts: 93
Joined: Tue Feb 03, 2009 7:26 pm

How to schedule an action at the end of uninstallation

Hi,
I want to schedule an action at the end of the uninstallation, to remove some files and some registry keys.
Where is this best to schedule? after 'RemoveFolders' or 'RemoveFiles?

And how to avoid that this is called during an upgrade?

Thanks,
chris
ChrisGue
Posts: 93
Joined: Tue Feb 03, 2009 7:26 pm

Re: How to schedule an action at the end of uninstallation

My custom action is now only called when the condition
REMOVE="ALL" AND NOT (UPGRADINGPRODUCTCODE)
is true
This seems to work.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Re: How to schedule an action at the end of uninstallation

Hi Chris,

Note that you can create "File Removal" operations in the Files and Folders page in order to delete files that have not been installed by the package. Similarly, for a registry key you can select the option "Delete (if present) at uninstall" in the "Registry Key" tab of the "Edit Registry Key" dialog.

If you decide to use a Custom Action, you can schedule it under the Uninstall node in the tree control (or anywhere between InstallInitialize and InstallFinalize). The Execution Options should be set to "Deferred with no impersonation" and the Execution Condition to the one you have mentioned:

Code: Select all

REMOVE="ALL" AND (NOT UPGRADINGPRODUCTCODE)
This how-to article may prove useful.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”