text stringlengths 0 4.23k |
|---|
reg query HKLM\Software\Microsoft\ResKit /v Version |
To display all subkeys and values under the key HKLM\Software\Microsoft\ResKit\Nt\Setup on a remote computer named ABC, type: |
reg query \\ABC\HKLM\Software\Microsoft\ResKit\Nt\Setup /s |
To display all the subkeys and values of the type REG_MULTI_SZ using # as the separator, type: |
reg query HKLM\Software\Microsoft\ResKit\Nt\Setup /se # |
To display the key, value, and data for exact and case sensitive matches of SYSTEM under the HKLM root of data type REG_SZ, type: |
reg query HKLM /f SYSTEM /t REG_SZ /c /e |
To display the key, value, and data that match 0F in the data under the HKCU root key of data type REG_BINARY, type: |
reg query HKCU /f 0F /d /t REG_BINARY |
To display the keys, values, and data that match asp.net under the key HKLM\SOFTWARE\Microsoft and all subkeys, type: |
reg query HKLM\SOFTWARE\Microsoft /s /f asp.net |
To display only the keys that match asp.net under the key HKLM\SOFTWARE\Microsoft and all subkeys, type: |
reg query HKLM\SOFTWARE\Microsoft /s /f asp.net /k |
To display the value and data for value names of null (default) under HKLM\SOFTWARE, type: |
reg query HKLM\SOFTWARE /ve |
reg restore |
Writes saved subkeys and entries back to the registry. |
Syntax |
reg restore <keyname> <filename> |
Parameters |
Parameter |
Description |
<keyname> |
Specifies the full path of the subkey to be restored. The restore operation only works with the local computer. The keyname must include a valid root key. Valid root keys for the local computer are: HKLM, HKCU, HKCR, HKU, and HKCC. If the registry key name contains a space, enclose the key name in quotes. |
<filename> |
Specifies the name and path of the file with content to be written into the registry. This file must be created in advance by using the reg save command, and must have a .hiv extension. |
/? |
Displays help at the command prompt. |
<keyname> |
<filename> |
Remarks |
Before editing any registry entries, you must save the parent subkey using the reg save command. If the edit fails, you can then restore the original subkey using the reg restore operation. |
The return values for the reg restore operation are: |
Value |
Description |
0 |
Success |
1 |
Failure |
Examples |
To restore the file named NTRKBkUp.hiv into the key HKLM\Software\Microsoft\ResKit, and overwrite the existing contents of the key, type: |
reg restore HKLM\Software\Microsoft\ResKit NTRKBkUp.hiv |
reg save |
Saves a copy of specified subkeys, entries, and values of the registry in a specified file. |
Syntax |
reg save <keyname> <filename> [/y] |
Parameters |
Parameter |
Description |
<keyname> |
Specifies the full path of the subkey. To specify a remote computer, include the computer name (in the format \\<computername>\) as part of the keyname. Omitting \\<computername>\ causes the operation to default to the local computer. The keyname must include a valid root key. Valid root keys for the local computer are: HKLM, HKCU, HKCR, HKU, and HKCC. If a remote computer is specified, valid root keys are: HKLM and HKU. If the registry key name contains a space, enclose the key name in quotes. |
<filename> |
Specifies the name and path of the created file. If no path is specified, the current path is used. |
/y |
Overwrites an existing file with the name filename without prompting for confirmation. |
/? |
Displays help at the command prompt. |
<keyname> |
\\<computername>\ |
\\<computername>\ |
<filename> |
Remarks |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.