<AMREGISTRY ACTION="text [options]" TYPE="string" KEY="text" VALUE="text" VALUEDATA="text" RESULTVARIABLE="text">
Modifies the Windows Registry according to the settings you specify.
Be careful! Improper use of this action can cause irreversible damage to your operating system installation. Do not use unless you know what you are doing.
Used to store, retrieve, modify or delete settings either for the task itself or for another application. For example, users may wish a task to save data collected during one session so that it can be retrieved and used the next time the task is run. In another possible use, users may wish to collect data about an external application by retrieving it from the applications registry branch. Using the HKEY_CURRENT_USER section of the registry is especially useful for storing "user-specific" data because each user on the Windows system has his/her own HKEY_CURRENT_USER structure that Windows loads in at log on, thus the data can be different depending on which user is logged on to the system. Use HKEY_LOCAL_MACHINE for settings that are not "user-specific" and are "global" to the machine. This action is intended for advanced users, improper use could damage your Windows installation and or the installation of other software on your system.
Specifies the action that the registry action should take.
The available options are:
read_value: Read Value Data - Used to read a value from the registry.
write_value: Create\Change Value Data - Used to write a value and and optional data to the registry. Necessary keys will be automatically created.
delete_value: Delete Value - Used to delete an value from the registry.
rename_value: Rename Value - Used to rename an Value in the registry.
create_key: Create Key - Used to create a key in the registry, multiple levels can be specified - any that do not exist will be created.
delete_key: Delete Key - Used to delete a key in the registry any subkeys will also be deleted - BE CAREFUL USING THIS OPTION
rename_key: Rename Key - Used to rename a key in the registry.
Only used if the "Action to Take" [ACTION] parameter is set to Create\Change Value Data" [write_value] specifies the data type to use otherwise this parameter is not needed.
The available options are:
string: Used for textual data
dword: Used for numerical data
Specifies the registry key (folder) that should be acted upon. What takes place in the key depends on the "Action to Take" [ACTION] parameter.
Specifies the name of an already created variable which should be populated with the value that is read from the registry. This parameter is only valid if ACTION=read_value.
Specifies Registry value that should be acted upon. What takes place in on the value depends on the "Action to Take" [ACTION] parameter.
Specifies the Registry value data to write. Valid only when the Create\Change Value Data is specified in the "Action to Take" [ACTION] parameter. The "Registry Key" and "Value Name" must also be specified for proper functioning.
This action includes the Description tab for entering a custom step description.
More on setting custom step description
This action also includes the standard Error Causes and On Error failure handling options/tabs.
More on Error Handling Options
All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.
More on variables
More on expressions
More on the expression builder
NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.
<AMREGISTRY ACTION="read_value" KEY="HKEY_CURRENT_USER\Software\Network Automation\AutoMate5\AMREGISTRY" VALUE="Left" RESULTVARIABLE="variablename">
<AMREGISTRY ACTION="write_value" TYPE="string" KEY="HKEY_CURRENT_USER\Software\Network Automation\AutoMate5\AMREGISTRY" VALUE="Left" VALUEDATA="170">