A common build script situation is that of developing a build script on one machine (typically a developer machine) and needing it to also run on a second machine (the production machine). Unless the two machines are set up identically, this can be tricky. For centralised control and easier version control, you may wish to use a single shared INI file as follows:

Let's assume that whenever you do a build using the development machine (named John), you want it to take place in "C:\Builds\Testing". When you do a build on the production machine (named Build), it takes place on "J:\Builds\Latest".

1. Create an INI file with the differences

First, create a .ini file in a shared location with the parameters. Give each section the name of the machine it applies to:

[Build]
BuildHome=J:\Builds\Latest
[John]
BuildHome=C:\Builds\Testing

Name the file something like "LocalParams.ini".

2. Make your build depend on these parameters

Define variables with the names you used in the INI file. Update all actions that use these locations to use the variables instead.

3. Load the INI file as the first step in the build

At the start of the build, add a "Load Variables from INI" that loads the relevant variables from the INI file. Use the %COMPUTERNAME% variable to load from the right section:

4. The finished product