Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows 綜合教學 >> 關於 Windows

Windows 命令列修改登錄:reg add 指令參數速查

編輯:關於 Windows

批次檔/自動化腳本中以命令列修改登錄,使用 reg add 指令,掌握核心參數即可靈活應用。

指令範例

reg add "HKLM\system\currentcontrolset\control\storagedevicepolicies" /v writeprotect /t reg_dword /d 1 /f

參數對照

參數說明範例值
/v值名稱 (Value Name)writeprotect
/t資料類型 (Type)reg_dword, reg_sz, reg_expand_sz, reg_binary, reg_multi_sz
/d資料內容 (Data)1, "文字", 十六進位...
/f強制覆寫不提示 (Force)(無需值)

常用根鍵縮寫

  • HKLM = HKEY_LOCAL_MACHINE
  • HKCU = HKEY_CURRENT_USER
  • HKCR = HKEY_CLASSES_ROOT
  • HKU = HKEY_USERS
  • HKCC = HKEY_CURRENT_CONFIG

搭配 reg delete、reg query、reg export/import 可完成登錄自動化管理全套操作。

Copyright © Windows教程網 All Rights Reserved