The CA DMM scripts use the following Exists commands:
Verifies that a directory exists. This command takes two parameters. The first parameter is the directory path and is a string value. The second parameter indicates whether to look on the source system or the destination system. The second parameter is optional and is a Boolean value. If the second parameter is True, the interpreter looks on the source system for the specified file. If the parameter is false or it is omitted, the interpreter looks on the destination system.
Note: The Boolean parameter can only be used during General and Apply functions. The parameter causes a syntax error or runtime error if used otherwise.
The Directory path (string value)
The system indicator (Boolean value)
DirectoryExists( <Directory path>, [Boolean] );
if (DirectoryExists( "c:\\My Documents")) StoreDirectory( "c:\\My Documents"); if (DirectoryExists( "c:\\My Documents", SOURCE)) ApplyDirectory( "c:\\My Documents");
Verifies that a file exists either on the source computer or on the destination computer. The first parameter is the file path and is a string value. The second parameter indicates whether to look on the source computer or on the destination computer. The second parameter is optional and is a Boolean value. If the second parameter is True, the interpreter looks on the source computer for the specified file. If the parameter is False or it is omitted, the interpreter looks on the destination computer.
Note: The Boolean parameter can only be used during General and Apply functions. If used otherwise, the parameter causes a syntax error or runtime error.
The File path (string value)
The system indicator (Boolean value)
FileExists( <file path> );
if (FileExists( "c:\\My Documents\\myfile.txt"))
StoreFile( "c:\\My Documents\\myfile.txt");
if (FileExists( "c:\\My Documents\\myfile.txt", SOURCE))
Verifies that a registry key exists on the source computer or on the destination computer. It can take two parameters. The first parameter is the registry key path and is string value. The second parameter indicates whether to look on the source computer or the destination computer. The second parameter is optional and is a Boolean value. If the second parameter is True, the interpreter looks on the source computer for the specified key. If the parameter is False or it is omitted, the interpreter looks on the destination computer.
Note: The Boolean parameter can only be used during General and Apply functions. If used otherwise the Boolean parameter causes a syntax error or runtime error.
The Key path (string value)
The system indicator (Boolean value)
KeyExists( <key path> );
if (KeyExists( "HKLM\\Software\\Microsoft\\Plus!", SOURCE))
Verifies that a registry key value exists in the registry or INI file. This command can take two or three parameters. The first parameter is the registry key path and the second parameter is the value name. The first two parameters are required and are string values. The third parameter indicates whether to look on the source computer or destination computer. The third parameter is optional and a Boolean value. If the third parameter is True, the interpreter looks on the source computer for the specified key. If the parameter is False or it is omitted, the interpreter looks on the destination computer.
Note: The third Boolean parameter can only be used during General and Apply functions. If used otherwise, the third Boolean parameter causes a syntax or runtime error.
The Key path (string value)
The Value name (sting value)
The system (Boolean value)
ValueExists( <Key path>, <Value name>, [Boolean] );
if (ValueExists( "HKCU\\Control Panel\\Desktop", "Smooth Scrolling", SOURCE))
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|