|
其实就是方便搞测试驱动的,主要干了下面几件事:
关闭UAC,Windows Defender,Windows Update,开启测试模式,调试模式,以及“DbgPrint可见”模式,最后重启,代码如下,语言是批处理。
- @echo off
- title Set New Test VM Sytstem Ready [code by tangptr@126.com]
- echo Set New Test VM Sytstem Ready [code by tangptr@126.com]
- echo.
- pause
- echo Attempt to Disable User Account Control...
- reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
- echo.
- echo Attempt to Disable Windows Update...
- sc config wuauserv start= disabled
- sc stop wuauserv
- echo.
- echo Attempt to Disable Windows Defender...
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f
- echo.
- echo Attempt to Enable DbgView to View DbgPrint
- reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter" /ve /t REG_SZ /d "0F" /f
- echo Attempt to Enable Test Signing Mode
- bcdedit /set testsigning on
- echo.
- echo Attempt to Enable Debug Mode
- bcdedit /set debug on
- echo.
- pause
- shutdown /r /t 0
复制代码
其中关闭UAC,WD和WU的代码来自Tesla.Angela(http://www.m5home.com/bbs/blog-4158-58.html)
将文件保存到.bat文件,然后以管理员权限运行该命令行 |
|