Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I disable UAC using Windows PowerShell?

How do I disable UAC using a PowerShell script? I can do this manually via the registry using the adding the following registry entry

Key:   HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA
Value: 0
Type:  DWORD

The script should account for the possibility that this key is already present and set incorrectly.

like image 356
Chris Ballance Avatar asked Mar 05 '12 18:03

Chris Ballance


People also ask

How do I remove UAC from a specific program?

On your desktop, right click and select New > Shortcut. Paste 'C:\Windows\System32\schtasks.exe /RUN /TN "Name of folder\Name of task" into the text box. This will create a link to your program that will automatically skip the prompt asking for permission to make changes to your computer.


1 Answers

New-ItemProperty -Path HKLM:Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA -PropertyType DWord -Value 0 -Force
Restart-Computer
like image 104
David Brabant Avatar answered Oct 18 '22 03:10

David Brabant