Scripts

Server Script

The Server Script tab is designed to contain the action script that determines whether or not an update is available, and actually applying the update. This script can be run from the Client Script using the TrueUpdate.RunScript action. The server script is normally the component that is updated each time a new version of your software is released. The server script is also a component of the server configuration files that are downloaded and loaded using the TrueUpdate.GetServerFile action.

Generally this tab will contain action script to determine which version of the software is currently installed on the client system. This can be done using various methods such as comparing file versions, file dates, Registry entries etc. The value read from the user's system would then be compared to some target value that will determine whether or not an update is available.

Server Scripts will also control the displaying of all Server Screens using the Screen.Show action. For example, once the server script has determined that an update is required, you would normally notify the user that there is an update available. Other common screens that may be shown are progress screens for downloading an installer/patch file, and status screens to notify the user of whether or not the update was successful or failed for some reason.

The Server Script contains all of the features of the action editor, but is represented in a tabbed view rather than a window. All of its features can be accessed from either the right-click context menu, or from the Script or Edit program menus.

Custom Script

For larger updates you may find that your Server Script is becoming too large. For these situations, TrueUpdate allows you to create additional custom server scripts for organizing your code. You can add a custom server script to your project by selecting Script > New from the program menu. Custom scripts can be called using the same method as the Server Script, using the TrueUpdate.RunScript action. All custom scripts created become part of the server configuration files.