I have a directory (Configurationfiles) containing 84 files. One of these files contains data that the user will modify (UserData.json). This file may or may not be there, but if it is I don't want to lose this data, and am trying to keep the install user friendly.
I am trying to modify an existing an install script that does all of the following:
- If there are no files in the directory, copy all of them
- If there are files overwrite all files except
UserData.json - if
UserData.jsonis missing copy defaultUserData.json - If
UserData.jsonis present prompt user to overwriteUserData.json, if yes overwrite, if no don't
Currently all of the files are copied no matter what and I never get a prompt to overwrite. This is what I have so far:
#define ExcludeFiles "UserData.json"
Source: ..\..\PROV\4200701\BIN\*.*; Excludes: {#ExcludeFiles }; DestDir: {app}\BIN; \
Flags: ignoreversion recursesubdirs skipifsourcedoesntexist;
Source: ..\..\PROV\4200701\BIN\Configurationfiles\UserData.json; \
DestDir: {app}\BIN\Configurationfiles;
Flags: ignoreversion onlyifdoesntexist confirmoverwrite skipifsourcedoesntexist;
I think I have something set up incorrectly with the flags. But I am not sure. Does anyone see where I am going wrong?