用命令行开关UAC

来源:互联网 发布:java 字符串截取 编辑:程序博客网 时间:2024/05/01 01:34
前言–在一个程序中, 看到她运行了一个命令行, google了一下, 原来是用命令行关UAC.记录–

There’s a quick way you can enable or disable this annoying window from the command line:

Disable UAC

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f

Enable UAC

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f

After you enable or disable UAC, you will have to reboot your computer for the changes to take effect.

0 0
原创粉丝点击