OverviewGlobal VariablesSession VariablesDesign-time Constants
Global variables are variables whose values are automatically set when your update starts. They are used in action script to represent common values that might differ between systems. These variables are all global which means you can use them anywhere in your project.
Tip: The built-in global variables are listed along with all of the actions and constants when you press Ctrl+Space in the action editor. Since all of the built-in variables start with an underscore, if you type _ and then press Ctrl+Space, you'll be taken right to the first built-in global variable in the list.
The following global variables are available in TrueUpdate:
Whether or not the client has been restarted after the client executable or client .dat has been updated after downloading the server configuration files. If this variable contains true the client has been restarted, and if it contains false, it has not. This variable is useful if you would like to skip certain steps in the Client Script such as showing the Welcome screen.
A numerically indexed table that contains the command line arguments passed into the update executable.
The path to the user's Desktop folder. On Windows NT/2000/XP, this is the path from the per-user profile.
The path to the user's Desktop folder. On Windows NT/2000/XP, this is the path from the All Users profile. On a non-Windows NT system, this will simply be the path to the user's Desktop folder (the same as _DesktopFolder).
Whether or not the close button (X) will be disabled on screens. If this boolean variable is set to true the close button will be disabled. If the value is false (by default), it will be enabled.
This variable contains the string "TU20" when used in TrueUpdate. This allows you to identify the product being run from script. This could be useful when making generic scripts that are used in several products, but that have different things to do based on the product being run from.
The user's Program Files folder (typically, this is something like "C:\Program Files").
The drive that the update executable was run from (e.g. "C:" or "D:").
The full path and filename of the update executable (e.g. "C:\Downloads\update.exe").
The full path to the folder that the update executable was run from (e.g. "C:\Downloads" or "D:\").
Whether or not dialog error messages will be shown from script errors. Initially this value is set to the boolean value false, but if set to true, script error dialogs will be suppressed.
Note: This only affects script errors and does NOT suppress action dialogs or screens.
The path to the user’s Windows System folder (e.g. "C:\Windows\System" on non-NT systems and "System32" on NT based systems).
A table indexed by error codes containing all of the possible error messages. For example, accessing the table index _tblErrorMessages[1000] will access the error code string "The specified file could not be found." The Application.GetLastError action is used to retrieve the last performed action's error code.
The path to the user's Temp folder.
The path to the user’s Windows folder (e.g. "C:\Windows").