|
通过bat脚本实现关闭或者开启Windows Defende的实时保护:
- [url=home.php?mod=space&uid=15075]@Echo[/url] off
- >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
- if '%errorlevel%' NEQ '0' (
- goto UACPrompt
- ) else ( goto gotAdmin )
- :UACPrompt
- echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
- echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
- "%temp%\getadmin.vbs"
- exit /B
- :gotAdmin
- if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
- pushd "%CD%"
- CD /D "%~dp0"
- powershell "if((Get-MpPreference).DisableRealtimeMonitoring){Set-MpPreference -DisableRealtimeMonitoring 0;echo WindowsDefender实时保护已开启}else{Set-MpPreference -DisableRealtimeMonitoring 1;echo WindowsDefender实时保护已关闭}"
- pause
复制代码
成品下载:https://fzw.lanzoux.com/ig1Gtn5l6gb
备用链接:https://www.90pan.com/b2419738
|
上一篇:位图转矢量图专业工具下一篇:2.20百度网盘不登陆不限速pandownload
|