Prevent Inno Setup deleting some files on uninstall

inno-setupuninstallation

Well, that actual question is already described in the title. I want to prevent Inno Setup uninstall from deleting log and config files that are stored in program installation directory. I know this is a bad practice. Normally I should use per-user directories and store all personal data there.

However this is a special case. The program I am working with, is a wrapper for a very old application. This old app has a lot of paths hard-coded into it and I need it to reside on C:\ and also to keep logs in the same directory as executables. Anyway, the whole setup is a bit messy.

Is there an easy way to selectively delete files/folders during uninstall?
Can I prevent some of them from being deleted?

Best Answer

Flags: uninsneveruninstall for files that you install, but want/need to leave after deinstallation.

All files that would be created by Application itself AFTER the installation will not be deleted during deinstallation - unless you would program that in your installation script.

Related Topic