Command Line Options

TrueUpdate's design time and run time support various command line options that can be passed, thus providing developers and network administrators more control over the update and build process.

Tip: The global variable _CommandLineArgs can be used to determine what arguments were passed to the update executable.

The available command line options are grouped into the following two categories:

 

Client Update Command Line Options

The following command line options are supported by the TrueUpdate client:

/DATFILE:<<Filename>>

Allows you to specify a client data file for the client executable to load. By default the client looks for a file with the same name as the executable but with the .dat file extension (Update.exe = Update.dat).

/NOFOCUS

Tells the update not to steal focus from any currently running application that has focus. This option will also not show a taskbar representation (regardless of the Taskbar Visibility) unless you show a screen.

Note: This command line option will cause any debug actions used in your update not to function.

/NOAUTOPROXY

Forces all actions that use HTTP connections in the update not to use the autoproxy feature.

/T:<<file path>>

Every update executable requires some temporary space on the user's hard drive during the update process. By default, TrueUpdate uses the user's TEMP directory for extracting temporary files and other miscellaneous operations. You can force the update executable to use an alternate directory by using the /T command line option.

The syntax for the /T option is:

/T:<<file path>>

Replace "<<file path>>" with the path to the folder you want the update executable to use for its temporary files. (Be sure to put quotes around the entire argument if the path includes any spaces.) If the folder doesn't already exist on the user's system, it will be created automatically.

For example:

 "C:\Program Files\MyProduct\update.exe" "/T:C:\My Temp Dir"

(forces the update to use "C:\My Temp Dir" for temporary files)

 

Unattended Build Options

The following command line options are supported by TrueUpdate's design environment for an unattended build process:

Note: The unattended build returns 0 as a process return code if successful, or non-zero if not. You can use this return code to make your batch files respond to the success or failure of the TrueUpdate build process. See the Build Error Codes topic for information on what codes can be returned.

/BUILD

Tells TrueUpdate to build the project file passed in on the cmd line or from a batch file. For example:
"C:\Program Files\TrueUpdate 3.0\TrueUpdate.exe" /BUILD "C:\TestProj.tu2"

/LOG:<<log file path>>

Specifies a log file to output build status to.  If the file exists, the output will be appended to it. If the file does not exist, it will be created. For example:

"C:\Program Files\TrueUpdate 3.0\TrueUpdate.exe" /BUILD "C:\TestProj.tu2" "/LOG:C:\output\Log.txt"

/STDOUT

Makes the build status go to the standard output device (console). For example:

"C:\Program Files\TrueUpdate 3.0\TrueUpdate.exe" /BUILD "C:\TestProj.tu2" "/STDOUT"

/CONST:<<ini file path>>

Lets you specify an INI file that contains design-time constants to override the ones in the project. You can define as many design-time constants as you want in the INI file, with each constant on a separate line beneath the [Constants] section. Each constant that is defined in the INI file must already be defined in the project file. For example:

 

[Constants]
#OUTPUTDIR#=C:\Output\Foobar 2002\Release
#UPDATENAME#=foobar2002update.exe
#BUILD#=release

When you use the /CONST option along with /BUILD, the specified project file is loaded into TrueUpdate, the constants described in the specified unattended-build INI file are set, and the update executable is generated-all without any interaction.

 

For example:
"C:\Program Files\TrueUpdate 3.0\TrueUpdate.exe" /BUILD "C:\TestProj.tu2" "/CONST:C:\MyProj\Config.ini"

 

Note: If you require the value to be a string and have defined the constant as something like "My Value" (including quotes) on the Constants tab of Build Settings, you must use two sets of quotes when setting the value through the INI file, such as: MY_CONSTANT=""My New Value""