Registry measure


Measure=Registry measures the value of a key in the Windows Registry.

Options

General measure options

All general measure options are valid.

RegHKey Default: HKEY_CURRENT_USER

Name of the root key. Valid values are:

  • HKEY_CURRENT_CONFIG
  • HKEY_CURRENT_USER
  • HKEY_LOCAL_MACHINE
  • HKEY_CLASSES_ROOT
  • HKEY_PERFORMANCE_DATA
  • HKEY_DYN_DATA

RegKey

Name of the subkey.

Note: Subkey names are case insensitive and delimited with \ backslash characters.

RegValue

Name of the value to return. If not specified, the default value is retrieved.

Note: The registry key value types supported are:

  • REG_SZ (string): A string usually UTF-16LE encoded. If the string represents a number, both the string and number measure values will be set.
  • REG_EXPAND_SZ (string): An "expandable" string similar to REG_SZ that can contain environment variables.
  • REG_MULTI_SZ (string): A series of strings separated by a null character. Rainmeter will convert any null separators to a newline character.
  • REG_DWORD (number): Represents a 32-bit unsigned integer.
  • REG_QWORD (number): Represents a 64-bit unsigned integer.
  • REG_BINARY (string): Represents binary data in uppercase unsigned hexadecimal integer format.

Alternative Behavior

OutputType Default: Value

Allows the default behavior where the named value is returned - to be changed - to return either a list of all subkeys for the defined key, or a list of all value names for the defined key. Valid values are:

  • Value: Retrieves the value defined by RegValue
  • SubKeyList: Retrieves a list of subkey names under the key defined by RegKey. RegValue is ignored.
  • ValueList: Retrieves a list of value names under the key defined by RegKey. RegValue is ignored.

OutputDelimiter Default: #CRLF#

When the value of OutputType is set to SubKeyList or ValueList, or if the registry key value type is REG_MULTI_SZ, the character(s) defined will be used to delimit items in the list, instead of the default newline.

Example

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,255

[MeasureWindowsVersion]
Measure=Registry
RegHKey=HKEY_LOCAL_MACHINE
RegKey=Software\Microsoft\Windows NT\CurrentVersion
RegValue=ProductName
UpdateDivider=-1

[MeterText]
Meter=String
MeasureName=MeasureWindowsVersion
X=5
Y=5
W=100
H=25
FontColor=255,255,255,255
Text="Version: %1"