Skip to content

Instantly share code, notes, and snippets.

@michele-tn
Last active May 5, 2025 14:42
Show Gist options
  • Save michele-tn/b0bcf890cd4f5acf3ec03d07c0de735b to your computer and use it in GitHub Desktop.
Save michele-tn/b0bcf890cd4f5acf3ec03d07c0de735b to your computer and use it in GitHub Desktop.

To Disable UAC

Using a Batch file:

REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t "REG_DWORD" /d "0" /f

Using Powershell:

 @powershell Set-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA -Value 0

To determine if UAC is disabled

Using a Batch file:

REG Query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA 

Using Powershell:

@powershell Get-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment