Using Tokens with Command Launch Operations

Tokens can be specified in the Command line field of Command Launch operations to transfer data from the Site database to an operation when the operation is performed. For example, the Remote Control operation uses the $NODE token, which enables it to automatically open the currently selected Client.

You can use the following tokens in the Command line field of a Command Launch operation:

Token

Description

Example

$DATE$

Returns the current date.

26-January-2004

$DD$

Returns the current day number.

 

$MM$

Returns the current month in two digits format.

06

$MMM$

Returns the abbreviated name of the current month.

Jun

$MONTH$

Returns the full name of the current month.

June

$YY$

Returns the current year in two digit format.

04

$YYYY$

Returns the current year in four digit format.

2004

$DDMMYY$

Returns today’s date in ddmmyy format.

260604

$DDMMYY(nn)$ $DD/MM/YY(nn)$ $DD-MM-YY(nn)$ $DDMMMYY(nn)$

Returns today’s date in day, month, year format, plus or minus a specified number of days.

 

$MMDDYY$

Returns today’s date in mmddyy format.

062600

$MMDDYY(nn)$ $MM/DD/YY(nn)$ $MM-DD-YY(nn)$ $MMMDDYY(nn)$

Returns today’s date in month, day, year format, plus or minus a specified number of days.

 

$YYMMDD$

Returns today’s date in yymmdd format.

200626

$YYMMDD(nn)$ $YY/MM/DD(nn)$ $YY-MM-DD(nn)$ $YYMMMDD(nn)$

Returns today’s date in year, month, day format, plus or minus a specified number of days. For example, if today’s date is 2004/01/11, $YYMMMDD(12)$ returns 23JAN04

 

$TIME$

Returns the current time.

18:53

$HOUR$

Returns the current hour.

18

$MINUTE$

Returns the current minute.

53

$DBCONNECT$

Returns the location of the Site database and the details required to connect it.

 

$DSNACCESS

Returns all of the above DSN information to identify the Site in the standard command format for the Database Viewer and SQLWizard.

 

$DSNNAME

Returns the ODBC DSN for the current Site.

 

$DSNPWD

Returns the password associated with database-level logon.

 

$DSNUSER

Returns the username associated with database-level logon.

 

$IPADDRESS

Returns the TCP/IP address for the specified Client.

90.0.0.40

$JOBNAME$

When the operation is scheduled, this parameter returns the job name specified by the user. When the operation is run interactively, the parameter returns an empty string.

 

$KITDIR$

Specifies the path from which the installer is being run with a trailing backslash. The path is specified in UNC format or as a mapped drive, depending on the settings for the package. (These are set using the Edit Distribution Definitions operation).

 

$MACADDRESS

Returns a Client's hardware network MAC address, where known (available only when a hardware inventory operation has collected data for the specified Client).

 

$NODE

Returns the Client (or Node) name.

 

$NODE(n)

Returns the first n characters of the Client name. For example, $NODE(5) returns ACCOU when the name is ACCOUNTS1.

 

$PROGFILES$

Returns the path of a Client's Program Files directory. In the Package Definitions Editor, the token can be used as part of:

    Check paths in the Summary tab.

    The Install command of the Install Types tab.

    User commands in the Pre-/post-processing tab.

D:\Windows\Program Files

$SITE$

Returns the name of the currently selected Site.

Site01

$SITEOFFLINE$

Returns the location of the first offline area defined for the Site.

\\vecsrv\lupush\

$SUBNETMASK

Returns the hardware network subnet mask, where known (available only when a hardware inventory operation has collected data for the specified Client).

 

 

Notes:

If any of the command line parameters, such as the $SITE$ or $JOBNAME$ values used in scheduled operations, contain spaces, it is necessary to enclose them in "double quotes".