WshShell.RegRead

Read a value from the Registry

Syntax 
      strValue = WshShell.RegRead(strRegistryKey\)
      strValue = WshShell.RegRead(strRegistryValue)

Arguments:

         The Registry key or value must start with one of
         the following

         HKCU
         HKEY_CURRENT_USER
         HKEY_USERS
         HKLM
         HKEY_LOCAL_MACHINE
         HKCR
         HKEY_CLASSES_ROOT
         HKEY_CURRENT_CONFIG

Example

Set WshShell = Wscript.CreateObject("Wscript.Shell")
strIconSetting = WshShell.RegRead("HKCU\Control Panel\Desktop\IconSpacing")
WScript.Echo strIconSetting

Related commands:

Registry, delete - WshShell.RegDelete
Registry, write - WshShell.RegWrite

Equivalent Windows NT command:

REG - Read, Set or Delete registry keys and values


Back to the Top

Simon Sheppard
SS64.com