注册表路径:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System
键说明:
ConsentPromptBehaviorAdmin:通知强度级别
EnableLUA:是否关闭UAC
PromptOnSecureDesktop:桌面是否变黑
1:UAC高
ConsentPromptBehaviorAdmin:2
EnableLUA:1
PromptOnSecureDesktop:1
2:UAC中
ConsentPromptBehaviorAdmin:5
EnableLUA:1
PromptOnSecureDesktop:1
3:UAC低
ConsentPromptBehaviorAdmin:5
EnableLUA:1
PromptOnSecureDesktop:0
4:UAC关闭
ConsentPromptBehaviorAdmin:0
EnableLUA:0
PromptOnSecureDesktop:0
================================================
彻底关闭批处理脚本:CloseUAC.bat
================================================
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
::::::::::::::::::::::修改注册表,获取管理员权限:::::::::::::::::: @echo off echo 获取Administrator权限 cacls.exe "%SystemDrive%\System Volume Information" >nul 2>nul if %errorlevel%==0 goto Admin if exist "%temp%\getadmin.vbs" del /f /q "%temp%\getadmin.vbs" echo Set RequestUAC = CreateObject^( "Shell.Application" ^)> "%temp%\getadmin.vbs" echo RequestUAC.ShellExecute "%~s0" , "" , "" , "runas" ,1 >> "%temp%\getadmin.vbs" echo WScript.Quit >> "%temp%\getadmin.vbs" "%temp%\getadmin.vbs" /f if exist "%temp%\getadmin.vbs" del /f /q "%temp%\getadmin.vbs" exit :Admin echo 成功取得Administrator权限 ::::::::::::::::::::::修改注册表,关闭UAC:::::::::::::::::: reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t reg_dword /d 0 /F reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t reg_dword /d 0 /F reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "PromptOnSecureDesktop" /t reg_dword /d 0 /F pause |
总结
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,谢谢大家对服务器之家的支持。如果你想了解更多相关内容请查看下面相关链接
原文链接:https://blog.csdn.net/woniu211111/article/details/82146732