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!

Mel
Posts: 53
Joined: Fri Jul 10, 2020 10:59 am

How can i unsinstall the application from Advanced Installer ?

I have an installer that installs a windows service and a iis wcf service .
How can i run a .exe console app that I wrote to run ONLY when the windows service or IIS service is uninstalled ?

Thanks
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: How can i unsinstall the application from Advanced Installer ?

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
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”