Disable UAC or Elevate

Jun 28, 2011 at 6:58 PM
Edited Jun 28, 2011 at 7:04 PM

I am new to SharePoint and looking through the installer at the moment and getting used to using this script, which is amazing BTW.  I was looking at the pre install steps and have used this piece of code before to elevate execution of scripts.  Might help in the future if Group Policy requires UAC, which was the case in a previous environment.

http://tweaks.com/windows/39176/elevate-command-powertoy/

 it might be an option to include this in the code, no reboot required.  

or

change the registry key at registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system; key = EnableLUA


You can use the following powershell code to check the value:

Code Snippet

$UAC = Get-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA
$UAC.EnableLUA

To change the value and disable UAC:

Code Snippet

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


 reboot required 

 

Just a thought.

Coordinator
Jun 29, 2011 at 2:27 AM

The script actually manages pretty well currently, with or without UAC enabled. Many environments require UAC be left on, so the script was designed to run in either scenario and self-elevates as required (rather than attempt to disable UAC completely, which may be unacceptable to some corporate policies).

Cheers
Brian