Loop - Values |
<AMLOOP ACTIVITY="values" KEY="text" RESULTDATASET="text"> |
Description:
Loops through the values contained in a registry key and populates a dataset with results.
Ideally used by administrators to registry management. They can use this activity to determine registry key values in order to perform operations on them using a variety of registry related activities, such as Rename value or Delete value.
General
Property |
Type |
Required |
Default |
Markup |
Description |
Registry key |
Text |
Yes |
(Empty) |
RESULTVARIABLE="varname" |
The registry key that houses the values to loop. |
Create and populate dataset |
Text |
Yes |
No |
ALLOWHIDDEN="yes" |
The name of the dataset to create and populate with key value information. |
This activity creates a dataset with the following fields (assuming the name of the dataset is theDataset):
Name |
Type |
Return Value |
thedataset.Name |
Text |
The value name (Example: REG_FULL_RESOURCE_DESCRIPTOR) |
thedataset.Type |
Text |
The value type (Example: string, DWORD, QWORD). |
thedataset.Data |
Text |
The value data. Such data depends on the value's name and type. Example:
|
NOTE: The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder. |
Description: Loops through all values in key "HKEY_LOCAL_MACHINE\SOFTWARE\Google\Google Toolbar\Branding". Populates dataset "thedataset" with information. Displays the following information in a message box:
Value Name: %thedataset.Name%
Value Type: %thedataset.Type%
Value Data: %thedataset.Data%
<AMLOOP ACTIVITY="values" KEY="HKEY_LOCAL_MACHINE\SOFTWARE\Google\Google Toolbar\Branding" RESULTDATASET="thedataset"> <AMSHOWDIALOG WINDOWTITLE="Registry Value Information" BUTTONS="ok_cancel" ONSECONDBUTTONCLICK="continue">Value Name: %thedataset.Name% Value Type: %thedataset.Type% Value Data: %thedataset.Data%</AMSHOWDIALOG> </AMLOOP>
|