The following are Keywords used in CA DMM Scripts.
Denotes the Detection function. Detection the first function the application calls. The Detect command (described previously) and Option commands must appear in this function.
function Detection()
{
// detection statements
}
Represents 0.
if (KeyExists( "HKLM\\Software\\Microsoft\\Plus!", false)) StoreKey( "HKLM\\Software\\Microsoft\\Plus!");
if (Detect ("winword.exe") == false)
return;
Declares any function and must appear before a General function name. A function must be defined before it is invoked from within the script. Only the General commands (not Store or Apply commands) can occur in this function.
function <function name> ( )
{
// do something
}
function MyStoreFunction()
{
//do something
Enables the include file to be parsed. Any assigned variables in the header file are inserted into the global scope of the script. The header file can include functions that can be invoked from the script or from the interpreter. The Include files must contain appropriate statements and must not be ended with a semicolon.
The file name (string value)
#include <file name>
#include "Script.hdr"
Denotes the PreProcess function. This function is always invoked before any store functions. If a network migration this function is invoked on the server. Only the General commands are allowed in this function.
function PreProcess()
{
// statements to run before any storing takes place
Denotes the PostProcess function. This function is always invoked after all apply functions. Only the General commands are allowed in this function.
function PostProcess()
{
// statements to run after all applying takes place
Specifies that a variable is to be local to the immediate scope. This variable allows for recursion in scripts.
var myLocalVariable;
function RecursionTest( strRecursionCount )
{
Print("enter RecursionTest = " + strRecursionCount );
if (strRecursionCount != "xxxx")
{
var strIfScope = strRecursionCount + "x";
RecursionTest( strIfScope );
}
else
{
return;
}
Print("leave RecursionTest = " + strRecursionCount );
}
function MyTestFunction()
{
RecursionTest( "x" );
Represents 1.
if (KeyExists( "HKLM\\Software\\Microsoft\\Plus!", true )) ApplyKey( "HKLM\\Software\\Microsoft\\Plus!" );
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|