Using Scripts In Packages

Package Studio supports the inclusion of custom scripts to your packages. See Using Script Commands for help building custom scripts.

You can set a script to activate at one of four times:

Name Activation Period
Pre-Install Script Script is executed before the installation of the other package contents.
Post-Install Script Script is executed after the installation of the other package contents.
Pre-Uninstall Script Script is executed before the uninstallation of the other package contents.
Post-Uninstall Script Script is executed after the uninstallation of the other package contents.

Script Variables

Package Studio scripts supports script variables. They can be used when creating device-side scripts. In addition to SOTI MobiControl-specific script variables, you can create your own variables.

Script Variable Description
%MCDEVICENAME% The configured name of the device.
%MCSTABLESTOREDIR% The path to the stable storage directory that SOTI MobiControl uses to back up files that need to persist after a hard reset or battery failure.
%MCSITENAME% There can be multiple SOTI MobiControl sites or installations within an organization. This variable holds the name of the SOTI MobiControl site to which the device belongs. The default SOTI MobiControl site name is "SOTI MobiControl".
%MCCABFILE% The full path to the SOTI MobiControl device agent cab file. The MobiControlDeviceAgent.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% The list of IP addresses for the configured SOTI 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.
Note: These script variables are only available on Windows Mobile devices.