Run Action Icon

Registry Action

Declaration

<AMREGISTRY ACTION="text [options]" TYPE="string" KEY="text" VALUE="text" VALUEDATA="text" RESULTVARIABLE="text">

See Also

Run, Send Keystrokes, DDE

Description

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.

Practical Usage

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.

Parameters

General Tab

Action to take
Options, Required
MARKUP: ACTION="write_value"

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

rename_key: Rename Key - Used to rename a key in the registry.

Type
Options, Required if ACTION="write_value"
MARKUP: TYPE="STRING"

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

Registry Key
Text, Required
MARKUP: KEY="HKEY_CURRENT_USER\Software\Unisyn\AutoMate5\AMREGISTRY"

Specifies the registry key (folder) that should be acted upon. What takes place in the key depends on the "Action to Take" [ACTION] parameter.

Populate Variable with Value Data
Text, Required if ACTION="read_value"
MARKUP: RESULTVARIABLE="myvarname"

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.

Value Name
Text, Required if ACTION="read_value,write_value,delete_value or rename_value"
MARKUP: VALUE="HKEY_CURRENT_USER\Software\Unisyn\AutoMate5\AMREGISTRY"

Specifies Registry value that should be acted upon. What takes place in on the value depends on the "Action to Take" [ACTION] parameter.

Value Data
Text, Required if ACTION="write_value"
MARKUP: VALUEDATA="170"

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.

Notes

Standard Error Handling Options
This action also includes the standard "Error Causes" and "On Error" failure handling options/tabs

More on Error Handling Options

Variables and Expressions
All text fields allow the use of expressions by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, a popup expression builder is available in all these fields by pressing F2.
More on variables...
More on expressions...
More on the expression builder...

Example

<AMREGISTRY ACTION="read_value" KEY="HKEY_CURRENT_USER\Software\Unisyn\AutoMate5\AMREGISTRY" VALUE="Left" RESULTVARIABLE="variablename">

<AMREGISTRY ACTION="write_value" TYPE="string" KEY="HKEY_CURRENT_USER\Software\Unisyn\AutoMate5\AMREGISTRY" VALUE="Left" VALUEDATA="170">