I am trying to package everything in C:\App\Web\*
into an installer.
If the database sub-folder mysql\data
exists, then I do not want to replace these files.
This is my Inno Setup script:
[Files]
Source: "C:\App\Web\xampp-control.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\App\Web\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "C:\App\Web\*"; DestDir: "{app}"; Excludes: "C:\App\Web\mysql\data\*"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: DirExists(ExpandConstant('{app}\mysql\data\*'))
The files in mysql\data
still get replaced.
I want the installer to avoid overwriting the data folder if the application is already installed (i.e. performing an upgrade).