MobiControl Script Variables


Note:

MobiControl script variables are case sensitive.

The MobiControl scripting engine exposes a number of MobiControl script variables that can be used when creating device-side scripts. These variables provide information such as the device name or the stable storage directory used by MobiControl. You can also create your own variables. Please see the set section of the Script Command Set page for more information about the set command.

The script variables are similar to environment variables, but are available only to scripts that are run as part of a package installation or uninstallation. Otherwise, they are used like environment variables. For example, you can use them to compose new variables or as arguments for script commands. Please see the Environment Variables section of the Script Command Set page for more information about environment variables.

Example:

To copy the file test.cab from the current directory to the configured stable storage directory on a device:
copy .\test.cab %MCSTABLESTOREDIR%

The following table describes the MobiControl script variables:

Script Variable Name Description
%MCDEVICENAME% The configured name of the device
%MCSTABLESTOREDIR% The path to the stable storage directory that MobiControl will use to back up files that need to persist after a hard reset or battery failure
%MCSITENAME% There can be multiple MobiControl sites or installations within an organization. This variable holds the name of the MobiControl site to which the device belongs. The default MobiControl site name is "MobiControl."
%MCCABFILE% The full path to the MobiControlDevice Agent.cab file. The MobiControl.cab file is typically saved in a stable storage directory on the device so that the agent can be reinstalled after a hard reset or battery failure.
%MCDSLIST%

This variable contains the list of IP addresses for the configured MobiControl Deployment Servers. The Device Agent uses this list to select a Deployment Server to which to connect. If a server has both an internal and an external IP address configured, then only the external address will be in the list. IP addressed are separated by semicolons ";."

%IP% IP address currently assigned to the device
%MAC% MAC address of the device's network interface card