Files To Persist On 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!

eeboy
Posts: 7
Joined: Fri May 14, 2010 12:28 am

Files To Persist On Uninstall

I am using the updater to update my application. It's setup to remove the application and then install. I also have a folder called Data which contains a file called library.xml. There are several user generated files in this folder as well. I want these files to remain after an uninstall. Upon installing I want the existing library.xml file to be renamed to libary_old.xml. Then a fresh copy (provided in the installer package) of library.xml copied to the directory. I've had zero success to this point mainly because the updater uninstalls everything and these files are deleted. I believe that the renaming is accomplished by simply adding a file operation (copy) to the library.xml file. However, I don't understand how I can tag a file so that it is not deleted on uninstall. Suggestions?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Files To Persist On Uninstall

Hello,

I am attaching a sample project file that renames the updater.exe file into updater_old.exe upon uninstall. If you want to rename it upon upgrade, condition the custom action with UPGRADINGPRODUCTCODE instead of REMOVE="ALL" as is now. Do this from the Custom Actions page.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
eeboy
Posts: 7
Joined: Fri May 14, 2010 12:28 am

Re: Files To Persist On Uninstall

Hope I am not just overlooking... but I don't see an attachment.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Files To Persist On Uninstall

Hi,

Sorry for that, it seems that my colleague forgot to attach the sample he made to the post.
However, I don't understand how I can tag a file so that it is not deleted on uninstall. Suggestions?
This should be very easy to accomplish using the "Persistent User Data" wizard, using it you can choose which file and registry entries are kept during an upgrade.

Please let me know if have other questions.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”