Cleaner when fail to Install/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!

lekfir
Posts: 130
Joined: Sun Feb 15, 2009 5:26 pm

Cleaner when fail to Install/Uninstall

Hello,
I want to build an EXEthat is used as a cleaner:
It should delete registry keys, files and any other locations to prevent from running a new installation when uninstall or install fails. (And user gets an MSI error...)

Is it possible to create such file?
Thanks!
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Cleaner when fail to Install/Uninstall

Hi,

This EXE file can be created, however I don't understand how exactly do you intend to use it.

Can you please give me more details, maybe we can find an easier solution for what you need to accomplish?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lekfir
Posts: 130
Joined: Sun Feb 15, 2009 5:26 pm

Re: Cleaner when fail to Install/Uninstall

Thanks Bogdan,
Sometimes, uninstall or install fails to run.
For example, when user stops installation in the middle or deletes some registry keys before uninstall.

That will cause to corrupted installation and fails to reinstall or uninstall the application.
In order to fix it sometimes you need to run some tweaks that lets it uninstall correctly or running the MSI from command line from c:\windows\installer...

I want to build an EXE file that will be located in my Program files folder that will be called Cleaner.exe and user will run it and after it does some work, the user will be able to install or uninstall the application.
Any Idea?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Cleaner when fail to Install/Uninstall

Hi,
when user stops installation in the middle
This scenario is handled automatically by Windows Installer. If an install or uninstall process is stopped while running, Windows Installer will perform a rollback which restores the system to its original state. If you have custom actions which modify the system, they should run as Deferred and should also have corresponding rollback custom actions. For example, a deferred custom action which creates a registry entry should have a rollback custom action which removes the entry.
or deletes some registry keys before uninstall
This shouldn't affect the uninstall process unless the missing registry entries affect a custom action. If this is the case, your custom action should handle missing registry entries and exit gracefully (use 0 as return code).

Please note that a MSI install or uninstall shouldn't have this type of problems. However, if they occur, usually there is a flaw in the installation configuration.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lekfir
Posts: 130
Joined: Sun Feb 15, 2009 5:26 pm

Re: Cleaner when fail to Install/Uninstall

Thanks a lot.
I will check it out

Return to “Common Problems”