The reg query command in Windows

The reg query command helps return the next list of subkeys and entries ...

The reg query command returns the following list of subkeys and entries that have been placed in a specified subkey in the registry.For a better understanding of how to use this command, see the example section below.

Syntax reg command command

 reg query [/ v | / ve}] [/ s] [/ se] [/ f] [{/ k | / d}] [/ c] [/ e] [/ t] [/ z] 

Parameter reg command command

Parameters

Describe

 

Specify the full path of the first subkey to be compared.To specify a remote computer, attach the computer name (in the format) as part of the KeyName parameter.In addition, the KeyName parameter must also include a valid root key.Valid root keys for local computers are: HKLM, HKCU, HKCR, HKU and HKCC.If the remote computer is specified, valid root keys will be HKLM and HKU.

/ v

Specify the registry value name to be queried.If this parameter is omitted, all value names for KeyName are returned.ValueName for this parameter is to become an option if the / f option is also used.

/ ve

Run a query for blank name values.

/S

Specify queries for all subkeys and recursive name values.

/ se

Specifies the separator of single values ​​to search in the value named REG_MULTI_SZ.If the Separator is not specified, it will be used by default.

/ f

Specify data or patterns to search.Use quotation marks if a string contains spaces.If this parameter is not specified, the wildcard (*) will be used as the search pattern by default.

/ k

Specify search only in the names of the keys.

/ d

Specify search only in data.

/ c

Specify that the query will be case sensitive.By default, the query will not be case sensitive.

/ e

The order returns exact match results.By default, all matching results will be returned.

/ t

Specify the type of registry to search.The valid registry is: REG_SZ, REG_MULTI_SZ, REG_EXPAND_SZ, REG_DWORD, REG_BINARY, REG_NONE.If this parameter is not specified, all categories will be searched.

/ z

Specifying search results must include equivalent numeric data in the form of the registry.

/?

Show help at thecommand prompt.

Parameter reg command command

The following table lists the return values ​​for the reg query command:

Value

Meaning

0

Success

first

Failure

Example of the reg query command

To display the value of the value named Version in the HKLMSoftwareMicrosoftResKit key, enter:

 REG QUERY HKLMSoftwareMicrosoftResKit / v Version 

To display all the subkeys and values ​​in the HKLMSoftwareMicrosoftResKitNtSetup key on the ABC named remote computer, type:

 REG QUERY ABCHKLMSoftwareMicrosoftResKitNtSetup / s 

To display all the subkeys and values ​​of the REG_MULTI_SZ registry format, in which, use # as a delimiter, enter:

 REG QUERY HKLMSoftwareMicrosoftResKitNtSetup / se # 

To display key, value, and data for SYSTEM's case sensitive and exact matches in the HKLM original value of the REG_SZ registry format, enter:

 REG QUERY HKLM / f SYSTEM / t REG_SZ / c / e 

To display the key, value and data that match the 0F in HKCU root key data of REG_BINARY data type, type:

 REG QUERY HKCU / f 0F / d / t REG_BINARY 

To display values ​​and data for empty name values ​​(default) in HKLMSOFTWARE, enter:

 REG QUERY HKLMSOFTWARE / tick 

See more:

  1. The qprocess command in Windows
  2. Qappsrv (query termserver) command in Windows
  3. The quser (query user) command in Windows
  4. The pubprn command and the pushprinterconnections command in Windows
4 ★ | 27 Vote