Suggestion from personal experience:
Isolate Settings
Your customers should be able to customize their settings, and the best way is to provide them with something like an override file. Thus, you install a new package and follow it, superimposing your client settings on top of the standard setting. If its a new installation, then nothing to overlap.
> top-level -- > standard files | images | This will never be touched or changed by customer settings.txt | __ > customer files -- images | Customer hacks this to their heart content settings.txt_override | --
Yes, this means that some kind of merging process should happen, and there should be some kind of script that does this, but this approach has several advantages.
- For settings that suddenly become redundant, simply issue a warning about this.
- If the client has its own logo, you can specify it in the override file
- The message is clear to customers. Stay away from standard files.
- If clients request more custom parameters, then write by default if it does not exist in the override file during updates.
Vilx, in response to your question, the logic for determining whether it is an update or not should be contained in the script itself.
To run update script before installation
msdeploy -verb:sync -source:contentPath="C:\Test1" -dest:contentPath="C:\Test2" -preSync:runcommand="c:\UpgradeScript.bat"
Or run update script after installation
msdeploy -verb:sync -source:contentPath="C:\Test1" -dest:contentPath="C:\Test2" -postSync:runcommand="c:\UpgradeScript.bat"
More here
As for how you know its update, your script can check a text file called "version.txt", and if it exists, the bat script will be updated. The version must be contained in a text file. The bit is basic, but it should work.
It also gives you the added benefit of allowing you to more elegantly combine client custom settings between versions, since you know which properties can be overridden for that particular version.
Bruno
source share