When does a Custom Action occur during Uninstall - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Art
Posts: 6
Joined: Sun Jun 01, 2008 3:58 pm

When does a Custom Action occur during Uninstall

Hello,

Suppose the user selects my product to be uninstalled.

A text file that was part of the WI installer package needs to be copied to the user's desktop before being deleted. May I use an uninstall exe custom action to accomplish this? I am unsure when uninstall custom actions occur in this process.

Thanks,
Art
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: When does a Custom Action occur during Uninstall

Hi Art,

During an installation process (first-time install, uninstall, upgrade etc.) Windows Installer always executes the same standard actions. Depending on the configuration of the package, these standard actions can perform some actions or they can do nothing. You can see a standard action in the Custom Actions page by using the "Show Standard Action" button on the toolbar. By default, only the "Uninstall", "Rollback", "Install" and "Commit" standard actions are shown. However, you can show any standard action you want in order to schedule a custom action under it.

The files installed by the package are removed during the "InstallExecuteSequence" -> "RemoveFiles" standard action. Therefore, a custom action which uses an installed file must be scheduled before this standard action (for example under "InstallExecuteSequence" -> "RemoveDuplicateFiles" standard action). Also, if you want to run a custom action only during an uninstall you need to set the "Expression" field in the Custom Action Properties page to:

Code: Select all

REMOVE="ALL"
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Art
Posts: 6
Joined: Sun Jun 01, 2008 3:58 pm

Re: When does a Custom Action occur during Uninstall

Thank you Cosmin,

I am amazed at your vast knowledge and your clear, succinct explanations.

Art

Return to “Common Problems”