

DMM Studio Online Help › DMM Studio › Script Language Overview › Tips and Tricks
Tips and Tricks
Consider the following tips and tricks when writing scripts:
- Always apply files before MappedValues or Keys. This lets CA DMM determine the correct short name associated with the file as it writes to the system. Then registry keys and values will map correctly.
- The Apply functions should always refer to the constant used to store the key, value, or file. It is a good idea to use the predefined constants WINDOWSPATH and APPLICATIONPATH in Apply functions.
- You can use wildcards in all file specifications. For example, if you want to use StoreDirectory for only a certain extension for the entire content of a folder, use the command StoreDirectories("c:\\temp\\*.txt"). It stores all files and folders with the .txt extension.
- All variables are global in scope, unless defined using var. This means that on the source computer if variables are defined in the Detection function, the variables are visible inside all of the Store functions. Because Detection is never run on the destination computer, the Detection function is not a good place to define all global variables. Global variables should be defined at the top of the script, outside all function definitions.
Copyright © 2013 CA.
All rights reserved.
 
|
|