1

Is it possible to set the value of the dialog below from the command line or powershell?

enter image description here

0
3

Warning: User Account Control is a security feature which controls user access boundary of unprivileged users aka. non-admin. Messing with registries associated with UAC may cause system instability. Backup registry settings before making any change. Use these with caution.

Here are the list of registry value changes (using this method) for all the four options in UAC prompt:

  1. Always notify
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLUA"=dword:1
"ConsentPromptBehaviorAdmin"=dword:2
"PromptOnSecureDesktop"=dword:1
  1. Notify me only when apps try to make changes to my computer (default)
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLUA"=dword:1
"ConsentPromptBehaviorAdmin"=dword:5
"PromptOnSecureDesktop"=dword:1
  1. Notify me only when apps try to make changes to my computer (do not dim my desktop)
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLUA"=dword:1
"ConsentPromptBehaviorAdmin"=dword:5
"PromptOnSecureDesktop"=dword:0
  1. Never notify me
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLUA"=dword:1
"ConsentPromptBehaviorAdmin"=dword:0
"PromptOnSecureDesktop"=dword:0

To change the values from Command Line use reg.exe commands in Command Prompt or in any shell or in any terminal. For example, the fourth change will be as follows:

set X=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
reg.exe add %X% /V "EnableLUA" /T REG_DWORD /D 1 /F
reg.exe add %X% /V "ConsentPromptBehaviorAdmin" /T REG_DWORD /D 0 /F
reg.exe add %X% /V "PromptOnSecureDesktop" /T REG_DWORD /D 0 /F

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.