View Full Version : How can I get IS to not delete certain files during Uninstall?

10-26-2003, 11:12 AM
I am overwriting an application's config file on my install. I write the existing file to a saved file and then overwrite it using CopyFile in a script. When uninstall is executed the saved file is removed so I cannot return the users machine to its original state.

There is no entry in the RemoveFile table for this file since, I am assuming, it is dynamically added during the setup.

I have tried to copy the saved file to yet another save file in the OnBegin event during an uninstall action thinking that the new saved file would not be deleted but this is not the case and the new saved file, created during the uninstall process, is also deleted.

Any help or advice would be appreciated.

10-27-2003, 03:25 AM
I'm not sure what kind of project you're using (pure InstallScript or InstallScript MSI?), but I also had a lot of trouble (http://community.installshield.com/showthread.php?threadid=94545) in IS Dev 7 (InstallScript MSI) when setting components to 'Never Overwrite' or 'Permanent'. I don't know if there's a real Workaround, but my solution was not to use these Properties anymore, and to do it myself with XCopyFile as you do. To avoid deletion of the copied files during uninstall or upgrade, try to wrap the copy-statement into Disable/Enable(LOGGING). To avoid uninstall of the original files, remove their Component GUID and care yourself about them during uninstall/upgrades.


10-27-2003, 07:49 AM
The disable logging was the key bit of information I needed.

This works great.

Thanks for the help!