Dark Tech
Now Reading
UAC Control from the Command Line
0

UAC Control from the Command Line

by Jason GreenJanuary 20, 2010

You can script UAC on and off with these commands:

Disable UAC

%windir%System32cmd.exe /k %windir%System32reg.exe ADD HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v EnableLUA /t REG_DWORD /d 0 /f

Enable UAC

%windir%System32cmd.exe /k %windir%System32reg.exe ADD HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v EnableLUA /t REG_DWORD /d 1 /f

Shell Execute these commands with any scripting language, or even just by typing them in! But remember, you or your script need administrator rights.

And optionally, the following comand to suppress all elevation consent request and notification:

Suppress Output
%windir%System32cmd.exe /k %windir%System32reg.exe ADD HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f

And before you ask, yes, that’s the UAC logo from Quake 😛

About The Author
Jason Green
The writer and owner of Green Complex, Jason is an A+ Certified for Computer Hardware egghead and Eagle Scout since 1999 but has been building computers and programming for much longer. An enthusiast to say the least, his hobbies also include photography, video games, and reading. See his proficiencies on Smarterer.

You must log in to post a comment