惡意軟體或管理員設定常透過修改註冊表鍵值 DisableRegistryTools 禁用 regedit。若無法執行 .reg 檔,可利用 IE 的 ActiveX 執行腳本直接修改註冊表解鎖。
<html>
<script language="VBScript">
var shl = new ActiveXObject("WScript.Shell");
shl.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableRegistryTools", 0, "REG_DWORD");
window.alert("註冊表已解除鎖定");
</script>
</html>
unlock_reg.html(編碼 ANSI/UTF-8 均可)。regedit。WScript.Shell ActiveX 物件寫入註冊表,繞過了 regedit 本身被禁用的限制。HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools = 0(0=啟用,1=禁用)。HKLM\...\Policies\System\DisableRegistryTools 同樣鍵值,若為 1 亦需改為 0(需管理員權限)。