The best way to make UAC shut up for a while

Let's say you want to install a few things and want UAC to stop bugging you while you install them.  Should you turn off UAC and install the apps?  Since that disables UAC's virtualization, it can destabilize things that depend on data written to those virtual locations.  Here's an alternative that keeps all the virtualization intact while getting UAC to lay off for a while.

Fire up gpedit.msc and adjust this policy (pictured below):

image

Change it to be Elevate without prompting:

image

Of course, remember to turn it back when you're done! :)

Cheers,

James

[Update: how to do this without using gpedit.msc]

Run this command (from an elevated command prompt) to make UAC elevate without prompting:

reg ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f

When you're done, run this command (from an elevated command prompt) to set it back to the default:

reg ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 2 /f