Disable UAC Prompt for a Single Application

Published 31 December 7 9:33 AM | Charlie Russel

A useful KB (946932) just got posted on support.microsoft.com. It describes how to disable the User Account Control (UAC) prompt for a specific application, without disabling it for the machine as a whole. Now THAT's useful. There's no way I'm ever going to run with UAC off. But there are definitely a couple of applications where I find the UAC prompt really annoying, since I use them pretty often.

BTW, there's another way I like to use as well. I open a PowerShell window, as administrator, at the beginning of every session. I have my Profile.ps1 set to change the background colour to a dark red whenever I'm running from an elevated prompt, just so I don't use it unintentionally, and I have aliases set up in PowerShell to start some key applications that I know need elevation. Since I'm already elevated, I don't get prompted again. :)

Here's the code for my prompt and window colours, if you're interested:

if ($p.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator) -and ( $build -eq 6000 ))
{
$effectivename = "Administrator"
$host.UI.RawUI.Backgroundcolor="DarkRed"
clear-host
}else
{
$effectivename = $id.name
$host.UI.RawUI.Backgroundcolor="White"
$host.UI.RawUI.Foregroundcolor="DarkBlue"
clear-host
}

function prompt
{
    $host.ui.rawui.WindowTitle = " [" + $HostName + "] (" + $effectivename + ")"
    if ( $effectivename -eq "Administrator" ) {
    write-host ("[") -nonewline -foregroundcolor red
    write-host ($Hostname) -nonewline -foregroundcolor Magenta
    write-host ("]") -nonewline -foregroundcolor Red
    Write-Host ([string]$(get-location) +":") -foregroundcolor Green
    write-host ("PS >" ) -nonewline -foregroundcolor White
    } else
    {
    write-host ("[") -nonewline -foregroundcolor red
    write-host ($Hostname) -nonewline -foregroundcolor Magenta
    write-host ("]") -nonewline -foregroundcolor Red
    Write-Host ([string]$(get-location) +":") -foregroundcolor DarkGreen
    write-host ("PS >" ) -nonewline -foregroundcolor DarkBlue
# write-host (" >" ) -nonewline -foregroundcolor White
    }
    return " "
}

Charlie.

Filed under: , ,

Comments

# John Robbins' Blog said on December 31, 2007 3:42 PM:

While I like User Account Control (UAC), there's always that one application that you need to run that

# UFies.org said on December 31, 2007 8:10 PM:

xPerts64 (a Microsoft x64 blog) has a hint on how to Disable UAC Prompt for a Single Application. Genius! Still...

# Carlos said on January 1, 2008 3:08 PM:

Charlie,

There is also this app www.tweak-uac.com/what-is-tweak-uac

that "softens" UAC prompts a little bit.

Carlos

# Charlie Russel said on January 1, 2008 3:55 PM:

Well, Carlos, that's an interesting application, but it's too all-inclusive for me. I don't _want_ to have UAC hidden (quiet option) from me normally. I want to KNOW it's doing what it's doing. And I definitely don't want it turned off. So I'll settle for either turning it off for a specific, known, application, or mostly use my elevated PowerShell prompt to explicitly start applications elevated.

# Disable UAC Prompt for an Application said on January 3, 2008 1:31 PM:

Pingback from  Disable UAC Prompt for an Application

# Disable UAC Prompt for a Single Application « Noocyte’s Weblog said on June 30, 2008 3:57 AM:

Pingback from  Disable UAC Prompt for a Single Application « Noocyte’s Weblog