|
时不时看到有朋友说注册表给禁用了,解禁的方法有很多,这里提供的是用BAT结合WSH启用或禁用注册表,优点是一个BAT文件就可以让你随心所欲启用或禁用注册表。代码如下:
- @echo off
- title "启用或禁用注册表"
- mode con cols=30 lines=6
- >Temp.vbs echo Dim WshShell
- >>Temp.vbs echo Set WshShell = WScript.CreateObject("WScript.Shell")
- >>Temp.vbs echo WshShell.Run "cmd /c del /q Temp.vbs",vbhide
- >>Temp.vbs echo intAnswer = MsgBox("【是】将“启用注册表”。 "^&Chr(10)^&Chr(10)^&"【否】将“禁用注册表”。 "^&Chr(10)^&Chr(10)^&"【取消】则“什么也不做”。 "^&Chr(10)^&Chr(10)^&"", vbQuestion + vbYesNoCancel, "启用或禁用注册表 by 6618")
- >>Temp.vbs echo If intAnswer = vbYes Then
- >>Temp.vbs echo WshShell.Run "cmd /c reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\ /v DisableRegistryTools /f",vbhide
- >>Temp.vbs echo end if
- >>Temp.vbs echo If intAnswer = vbNo Then
- >>Temp.vbs echo WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools",1,"REG_DWORD"
- >>Temp.vbs echo end if
- >>Temp.vbs echo If intAnswer = vbCancel Then
- >>Temp.vbs echo end if
- >>Temp.vbs echo Set WSHShell = Nothing
- >>Temp.vbs echo WScript.Quit(0)
- start Temp.vbs
复制代码 |
|