Write-RegistryDWord
Write-RegistryDWord
Changes or adds a value of type DWord (= double word, 4 bytes) in the registry, existing entries in the registry are updated.
Settings:
- Key
Select the key in which a value is to be set. Variables are allowed. 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
Click this radio button to change the default value in the specified key. - Radio button
Select an existing value (on the packaging system) from the drop-down list or enter the value name manually. - Value
The decimal value to be set. The action is used to specify how the value is to be set (set, add or subtract). - 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. - Action
Defines how to handle the contents of a possibly existing value - Set value
The content is set to the specified value and any existing value is overwritten. - Add value to existing value
If a value already exists, the specified value is added to the existing content. - Subtract value from existing value
If a value already exists, the specified value is subtracted from the existing content.
Example:
The following example sets the contents of the value ScreenSaveUsePassword in the key HKEY_CURRENT_USER\Control Panel\Desktop to 1, regardless of whether or not the value already existed or had different contents.
Corresponds to DSM eScript command:
- RegModifyDWord
See also: