en fr

Sysquake Pro – Table of Contents

Sysquake – Table of Contents

Sysquake for LaTeX – Table of Contents

Extension - winregistry

This section describes a function which queries the Windows registry.

The registry is a hierarchical database which describes settings and hardware on Windows computers. It has a structure similar to a file system, where directories are keys and files are values. Keys and values have a name; each key can also have an unnamed value. Access to a key starts from a root key and follows a path made of backslash-separated keys.

Function

winqueryreg

Query the Windows registry.

Syntax

keylist = winqueryreg('key', rootkey, subkey)
namelist = winqueryreg('name', rootkey, subkey)
value = winqueryreg(rootkey, subkey)
value = winqueryreg(rootkey, subkey, name)

Description

winqueryreg gives read-only access to the Windows registry.

winqueryreg('key',rootkey,subkey) gives a list of direct subkeys of the key identified by rootkey and subkey. rootkey must be one of the following strings:

rootkeymeaning
'HKEY_CLASSES_ROOT'registered application data
'HKEY_CURRENT_CONFIG'information gathered at runtime
'HKEY_CURRENT_USER'configuration data for the current user
'HKEY_LOCAL_MACHINE'local configuration data
'HKEY_USERS'configuration data for user profiles
'HKEY_PERFORMANCE_DATA'performance data

Argument subkey is a string containing backslash-separated keys.

winqueryreg('name',rootkey,subkey) gives a list of value names of the key identified by rootkey and subkey. The unnamed value is omitted.

winqueryreg(rootkey,subkey) gives the contents of the unnamed value of the key identified by rootkey and subkey. Supported types are REG_DWORD (32-bit signed integers, returned as double) and REG_SZ (null-terminated strings, returned as strings without null terminator).

winqueryreg(rootkey,subkey,name) gives the contents of the value named name of the key identified by rootkey and subkey.

Examples

winqueryreg('key', 'HKEY_CLASSES_ROOT','Sysquake.SQFile')
  {'DefaultIcon','shell'}
winqueryreg('name', 'HKEY_CURRENT_USER','Control Panel')
  {'Opened'}
winqueryreg('HKEY_CURRENT_USER','Control Panel', 'Opened')
  1