Read-RegistryValue
Read-RegistryValue
This command reads information from the registry. The dialog box is used to specify which value is to be read from which key. The read value is stored in the variable specified in the dialog box and is available in the rest of the package.
Settings:
- Key
Select the key from which the value of a value is to be read. Variables are permitted. Use the "..." button to select an existing key (on the packaging system) or enter the key manually.
- Value name
Optionally the default value of the key or the name of another value. - Default value
The content of the default value of the key is read. - Radio button
Select an existing value (on the packaging system) from the drop-down list or enter the value name manually. - Variable name
Name of the variable in which the read value is stored. Enter only the name of the variable, not the $ sign and the curly brackets. - Use 32-Bit mode on x64 computer
If the script runs on a 64-bit operating system, referencing the HKEY_LOCAL_MACHINE\SOFTWARE key allows the 32-bit application counterpart HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node to be used automatically.
Example:
The following example reads the content of the Version value from the key HKEY_LOCAL_MACHINE\SOFTWARE\CANCOM GmbH\PowerShell Extensions and stores it in the _PSXVersion variable
Corresponds to DSM eScript commands:
- RegReadValue
- RegReadValueEx
See also: