parameter

The parameter command can be used to create new action variables during the execution of the action. It takes the form:

parameter "x" = "{expression}" 

This command allows you to access the parameter using the inspector parameter "x". The parameter is only inspectable within the current action. Parameters are initialized just prior to the startup of the action from headers added to the action by the IBM BigFix Console.

You can't reset a parameter that already has a value. When this occurs, the client will abort the action at the line that is attempting to reset the parameter. Any errors that result from evaluating the expression will be handled by making the named parameter become undefined.

The rules of the parameter command are:

Parameter expressions will be coerced into strings.

Plural expressions that result in no values will result in an empty parameter value.

Plural expressions that result in a single value that can be coerced into a string will assign the value.

Plural expressions that result in more than one value will result in a failure of the action.

Syntax

parameter "<x>" = "<{expression}>"

Where x is the name of the parameter and expression is the value. Note that both the name of the parameter and the expression must be inside quotes.

Example

parameter "loc" = "{pathname of folder (value of variable "tmp" of environment)}" 
createfile until end
      Operating system = {name of operating system} 
      Processor count = {number of processors}
end 
delete "{parameter "loc"}\config.txt"
copy __createfile "{parameter "loc"}\config.txt"

Defines a parameter named "loc" that contains the pathname of the tmp folder, creates a new name=value file containing the operating system and processor count, deletes the config file from the tmp folder and replaces it with new file.

Version 6.0 and above