惡意網頁利用 ActiveX 控制項修改登錄 HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools = 1 鎖定註冊表編輯器。既然是用網頁技術鎖定,同樣可用一支本地 HTML 檔案執行反向解鎖腳本,將該值改回 0。
UnlockReg.html)<html>
<script language="VBScript">
Dim shl
Set shl = CreateObject("WScript.Shell")
shl.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools", 0, "REG_DWORD"
MsgBox "註冊表已解除鎖定"
</script>
</html>
注意:原文代碼含全形字符與語法錯誤,上方為修正後可執行版本 (VBScript 語法)。
UnlockReg.html (編碼 ANSI/UTF-8 均可)。regedit。
WScript.Shell ActiveX 物件寫入 DisableRegistryTools = 1。0 解除限制。gpedit.msc → 使用者設定 → 系統 → 阻止存取登錄編輯工具 → 設為「未設定」或「已停用」。Unlock.reg 內容 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System] "DisableRegistryTools"=dword:00000000,雙擊匯入 (若 regedit 被鎖無法匯入,可用上述 HTML 法先解鎖)。reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableRegistryTools /t REG_DWORD /d 0 /f (需 cmd 未被限制)。