Reads a value from the Registry and assigns it to a variable.
Action ID: 12
Action Category: Registry
The name of the variable to store the result in.
The default value to assign to the variable if the Registry key does not exist or cannot be read.
The main or "root" key where the sub key can be found.
The sub key to read from.
The name of the Registry value (in the sub key) to read from.
When this is checked, the variable will be set to "TRUE" if the key exists or to the Default value if the key doesn't exist.
If the value turns out to be of type REG_EXPAND_SZ and this is checked, the value will be expanded before it is stored in the variable.
Value |
Simple Message |
Verbose Message |
0 (OK) |
|
|
1 |
Could not read from the Registry. |
Could not open key. |
2 |
Could not read from the Registry. |
Could not read value. |
In this example, we will read the location of our previous installation from the registry and store it in a custom variable named %PreviousLocation%.
Variable name: %PreviousLocation%
Default value: Not Installed
Main key: HKEY_CURRENT_USER
Sub key: Software\My
Company\The Product
Value name: InstallDir
Set variable to TRUE if Sub Key
exists: Unchecked
Auto-expand if value is of type REG_EXPAND_SZ: Unchecked
See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab