3

I am attempting to create an installer for a MOD but have run into the issue of when it is uninstalled it will revert back to its former state.

I have figured out how to backup the entire folder but I would like to back up only files and folders of the files that will be overwritten.

[Dirs]
Name: "{app}\_backup"

[Files]
Source: "C:\Users\User\Mod\bin"; DestDir: {app}; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "{app}\*"; DestDir: "{app}\_backup"; Flags: external skipifsourcedoesntexist ignoreversion recursesubdirs createallsubdirs

How would this be done?

  • 1
    You could split install of source files and add `BeforeInstall` event code that would check if file exists and then back it up. – RobeN Aug 01 '13 at 12:08
  • Is there a way to determine the current file that is being extracted or get a list of files to be extracted, then I would be able to loop though the list and backup the files as you said? –  Aug 01 '13 at 12:20
  • Figured out you can use `CurrentFileName` to get the file currently being processed which is what i needed to write the function, thanks for your help. –  Aug 01 '13 at 13:00
  • Yes, that might work. From `BeforeInstall` function you can get the `CurrentFileName` value. – TLama Aug 01 '13 at 13:58

0 Answers0