UAC Control from the Command Line

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 😛

We will be happy to hear your thoughts

Leave a reply

Skip to toolbar