Win10 開啟登錄表編輯器常用 Win + R regedit,但頻繁編輯特定路徑時,VBS 腳本可實現「複製路徑 → 雙擊腳本 → 直接定位」的高效工作流。
' Created by Sergey Tkachenko
Dim objHTA, cClipBoard, WshShell
Set objHTA = CreateObject("htmlfile")
cClipBoard = objHTA.parentwindow.clipboarddata.getdata("text")
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\LastKey", cClipBoard, "REG_SZ"
WshShell.Run "regedit.exe -m"
Set objHTA = Nothing
Set WshShell = Nothing
regedit.vbs (需顯示副檔名,確認修改提示點「是」)。

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolder\NameSpace\DelegateFolders)。regedit.vbs → 點選安全警告「開啟」→ UAC 確認「是」。
原理:腳本讀取剪貼簿文字寫入 LastKey 鍵值,regedit -m 參數啟動時會自動展開該路徑。適合頻繁編輯固定分支的開發者/進階用戶。