Using MCScript to Update Your Script Files
296
Management Edition
Flow control statements
NOTE:
[..] Indicates optional parameters and switches.
Command
name
Min #
params
Usage, examples, and comments
GOTO
1
GOTO
<GOTO_LABEL>
Example:
GOTO EndOfScript
;
; Script commands….
;
EndOfScript:
GOTODEFER 1
GOTODEFER
<GOTO_LABEL>
Commands between the command and the label are
deferred until a user logs into the machine
(Windows NT only).
IF
1
IF
<CONDITIONAL_CLAUSE>
Next statement is executed if conditional evaluates != 0.
<CONDITIONAL_CLAUSE>: ‘COUNTER’ | ‘VERSION’
| <COMMAND_NAME> [<OPERATOR> <VALUE>]
‘COUNTER’: Uses value of internal counter variable.
‘VERSION’: Uses Update Agent build number.
<COMMAND_NAME>: Name of any non-flow control
command, uses last result of that command.
<OPERATOR>: ‘=’ | ‘!=’ | ‘<’ | ‘>’
<VALUE> = ‘TRUE’ | ‘FALSE’ | <Any Integer Value>
Example:
IF VERSION > 935
LOADLIBRARYCHECK !OLDGINAVAR!
OLDGINAVAR MSGINA.DLL
ELSE
0
Should be second non-comment/blank line after IF
command.