

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 the files before you apply the MappedValues or Keys. This lets CA DMM determine the correct short name that is associated with the file as it writes to the system. Then registry keys and values map correctly.
- The Apply functions must always refer to the constant used to store the key, value, or file. 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. For example, if the variables are defined in the Detection function, the variables are visible inside all of the Store functions.
- Do not run Detection on the destination computer.
- Do not define all the global variables in the Detection function.
- Ensure that you define the global variables at the top of the script, outside all function definitions.
Copyright © 2014 CA Technologies.
All rights reserved.
 
|
|