Consider the following:
I have two files, for example
XXX.txt
andYYY.txt
I want to install them to a folder (let's say
files
), in which there are alreadyXXX.txt
andYYY.txt
filesI want to "back up" the two original files, renaming them to
XXX.txt.backup
andYYY.txt.backup
On uninstall I want to restore the two files to their original state
How can I achieve this with Inno Setup?
Add
That would move the existing file, and the flags will prevent from uninstalling it. Now in the code you can put
Well, maybe a popup saying "There is already an XXX.txt.backup. Do you really want to overwrite it?"
Did not appear to work, since "The compiler will prepend the path of your installation's source directory if you do not specify a fully qualified pathname."
However, I just discovered this works fine! I had left off the "external" flag.