The process for writing scripts to migrate application settings includes the following major phases:
- Research
-
The research steps are as follows:
- Start with a computer that does not have the application installed, run a difference tool or install a monitoring program to detect what files and registry keys are associated with the installation of the application.
- Run the application and determine whether any other keys are added or modified the first time an application is run.
- Determine where all of the settings are stored and how they are changed with each change in settings. Most applications use the registry, some applications use initialization files (.ini), and others use proprietary data file formats to store configuration settings or preferences.
- Design
-
After the research is completed, you should design how the script will work and what you expect it to do. Consider the following:
- What versions of the application settings can be migrated?
- What settings can be moved between versions?
- How finely do you want to categorize options?
- How can CA DMM detect the application settings?
- What registry keys indicate that the application settings are installed?
- What shortcuts are on the desktop or Start menu program groups?
- Writing
-
With the language guide in hand, or using this help system, begin writing the script. Consider the following:
- If the settings option is the only selection, the destination computer must have the application installed and all settings (customizations) will be migrated.
As you write the script, consider the following about these language functions:
- Apply Functions
-
When you apply keys and values to any initialization files, be sure to specify that short names be used.
- Debugging
-
Consider the following:
- Ensure that CA DMM logging options are set to create a very detailed Debug log of information.
- Try the script with CA DMM on a single computer by saving to a DNA file.
- Review the Error log to determine whether all commands executed properly.
- Check the Debug log to determine what actions completed.
- Use print statements to print values into the Debug Log so that you can watch variables at different points in the migration.
- Testing
-
Run the script in all expected environments such as within DNA files and across the network.