指定したファイル内のレジストリの指定したサブキー、エントリ、および値のコピーを保存します。
Syntax
reg save <keyname> <filename> [/y]
Parameters
Parameter | Description |
---|---|
<keyname> |
サブキーの完全パスを指定します。 To specify a remote computer, include the computer name (in the format \\<computername>\ ) as part of the keyname.
\\<computername>\ を省略すると、操作は既定でローカル コンピューターになります。 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. レジストリ キー名にスペースが含まれている場合は、キー名を引用符で囲みます。 |
<filename> |
作成されたファイルの名前とパスを指定します。 パスが指定されていない場合は、現在のパスが使用されます。 |
/y | Overwrites an existing file with the name filename without prompting for confirmation. |
/? | コマンド プロンプトにヘルプを表示します。 |
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 save operation are:
Value Description 0 Success 1 Failure
Examples
Hive MyApp を AppBkUp.hiv という名前のファイルとして現在のフォルダーに保存するには、次のように入力します。
reg save HKLM\Software\MyCo\MyApp AppBkUp.hiv
Related links
reg restore コマンド を する