2018-01-22 03:24:20 +00:00
|
|
|
# reg query
|
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
> Display the values of keys and subkeys in the registry.
|
2022-10-04 16:06:23 +01:00
|
|
|
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/reg-query>.
|
2018-01-22 03:24:20 +00:00
|
|
|
|
|
|
|
- Display all values of a key:
|
|
|
|
|
|
|
|
`reg query {{key_name}}`
|
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
- Display a specific [v]alue of a key:
|
2018-01-22 03:24:20 +00:00
|
|
|
|
|
|
|
`reg query {{key_name}} /v {{value}}`
|
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
- Display all values of a key and its [s]ubkeys:
|
2018-01-22 03:24:20 +00:00
|
|
|
|
|
|
|
`reg query {{key_name}} /s`
|
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
- Search [f]or keys and values matching a specific pattern:
|
2018-01-22 03:24:20 +00:00
|
|
|
|
|
|
|
`reg query {{key_name}} /f "{{query_pattern}}"`
|
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
- Display a value of a key matching a specified data [t]ype:
|
2018-01-22 03:24:20 +00:00
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
`reg query {{key_name}} /t REG_{{SZ|MULTI_SZ|EXPAND_SZ|DWORD|BINARY|NONE}}`
|
|
|
|
|
|
|
|
- Only search in [d]ata:
|
|
|
|
|
|
|
|
`reg query {{key_name}} /d`
|
|
|
|
|
|
|
|
- Only search in [k]ey names:
|
|
|
|
|
|
|
|
`reg query {{key_name}} /f /k`
|
|
|
|
|
|
|
|
- [c]ase-sensitively search for an [e]xact match:
|
|
|
|
|
|
|
|
`reg query {{key_name}} /c /e`
|