Main Content

winqueryreg

Item from Windows registry

Description

valnames = winqueryreg('name',rootkey,subkey) returns all value names in rootkey\subkey of Microsoft® Windows® operating system registry. The first argument is the literal, quoted, case-sensitive string or character vector 'name'.

value = winqueryreg(rootkey,subkey,valname) returns the value for valname in rootkey\subkey.

value = winqueryreg(rootkey,subkey) returns a value in rootkey\subkey that has no value name property.

Input Arguments

collapse all

Root key name, specified as a case-sensitive string or character vector.

Example: 'HKEY_CLASSES_ROOT'

Subkey name, specified as a string or a character vector. The value is not case-sensitive.

Example: 'control panel\mouse'

Name of value, specified as a string or a character vector. The name is not case-sensitive.

Output Arguments

collapse all

Value names, specified as a cell array of character vectors.

Value of specified name, specified as a character vector if the value retrieved from the registry is a registry string value. If the value is a 32-bit integer, winqueryreg returns the value as an integer of the MATLAB® type int32.

Limitations

  • This function works for the following registry value types only:

    • strings (REG_SZ)

    • expanded strings (REG_EXPAND_SZ)

    • 32-bit integer (REG_DWORD)

Version History

Introduced before R2006a

See Also