Skip to content

Instantly share code, notes, and snippets.

@oxocode
Forked from nickfloyd/gist:4444709
Created April 4, 2014 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oxocode/9976825 to your computer and use it in GitHub Desktop.
Save oxocode/9976825 to your computer and use it in GitHub Desktop.
#To disable the UAC prompt and run everything by default as admin
#Is set to 1 by default
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableLUA" -Value "0"
shutdown -r -t 0 #reboot
#--------------------------------------------------
#If the above breaks your ability as an Admin to install apps from the Microsoft store
#run the following in an elevated Powershell console
#Is set to 2 by default
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value "0"
#Is set to 0 by default
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableUIADesktopToggle" -Value "1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment