World Library  
Flag as Inappropriate
Email this Article

User Account Control


User Account Control

User Account Control dialog in Windows 7 when loading unsigned code
User Account Control dialog in Windows 7 when loading signed code

User Account Control (UAC) is a technology and security infrastructure introduced with Microsoft's Windows Vista and Windows Server 2008 operating systems, with a more relaxed[1] version also present in Windows 7, Windows Server 2008 R2, Windows 8, and Windows Server 2012. It aims to improve the security of Microsoft Windows by limiting application software to standard user privileges until an administrator authorizes an increase or elevation. In this way, only applications trusted by the user may receive administrative privileges, and malware should be kept from compromising the operating system. In other words, a user account may have administrator privileges assigned to it, but applications that the user runs do not inherit those privileges unless they are approved beforehand or the user explicitly authorizes it.

To reduce the possibility of lower-privilege applications communicating with higher-privilege ones, another new technology, User Interface Privilege Isolation, is used in conjunction with User Account Control to isolate these processes from each other.[2] One prominent use of this is Internet Explorer 7's "Protected Mode".[3]


  • History 1
  • Tasks that trigger a UAC prompt 2
  • Features 3
  • Requesting elevation 4
  • Criticism 5
  • See also 6
  • References 7
  • External links 8


Operating systems on mainframes and on servers have differentiated between superusers and userland for decades. This had an obvious security component, but also an administrative component, in that it prevented users from accidentally changing system settings.

Early Microsoft home operating-systems (such as MS-DOS, Windows 95, Windows 98 and Windows Me) did not have a concept of different user-accounts on the same machine, and all applications enjoyed system-wide privileges rivaling (Windows 95, Windows 98, and Windows Me) or equal to (MS-DOS, Windows versions 1.0-3.11) the operating system itself. Windows NT introduced multiple user-accounts, but in practice most users continued to function as an administrator for their normal operations. Further, some applications would require the user be an administrator for some or all of their functions to work.[4] Subsequent versions of Windows and Microsoft applications encouraged the use of non-administrator user-logons, yet some applications continued to require it. To be certified Windows-compliant by Microsoft, and be able to use the Windows-compliant logo with their packaging, applications must not have required administrator privileges.

Microsoft developed Vista security firstly from the Limited User Account (LUA), then renamed the concept to User Account Protection (UAP) before finally shipping User Account Control (UAC).[5] Introduced in Windows Vista, User Account Control (UAC) offers an integrated, balanced approach to encourage "super-user when necessary". The key to UAC lies in its ability to elevate privileges without changing the user context (user "Bob" is still user "Bob"). As always, it is difficult to introduce new security features without breaking compatibility with existing applications.

When someone logs into Vista as a standard user, the system sets up a logon session and assigns a token containing only the most basic privileges. In this way, the new logon session cannot make changes that would affect the entire system. When logging in as a user in the Administrators group, two separate tokens are assigned. The first token contains all privileges typically awarded to an administrator, and the second is a restricted token similar to what a standard user would receive. User applications, including the Windows Shell, then start with the restricted token, resulting in a reduced-privilege environment - even under an Administrator account. When an application requests higher privileges or when a user clicks a "Run as administrator" option, UAC will prompt standard users to enter the credentials of an Administrator account and prompt Administrators for confirmation and, if consent is given, continue or start the process using an unrestricted token.[6]

In Windows 7, Microsoft included a user interface to change User Account Control settings, and introduced one new notification mode, the default setting. By default, UAC does not prompt for consent when users make changes to Windows settings that require elevated permission through programs stored in %SystemRoot% and digitally signed by Microsoft. Programs that require permission to run still trigger a prompt. Other User Account Control settings that can be changed through the new UI could have been accessed through the registry in Windows Vista.[7]

Tasks that trigger a UAC prompt

Tasks that require administrator privileges will trigger a UAC prompt (if UAC is enabled); they are typically marked by a security shield icon with the 4 colors of the Windows logo (in Vista and Windows Server 2008) or with two panels yellow and two blue (Windows 7 and Server 2008 R2). In the case of executable files, the icon will have a security shield overlay. The following tasks require administrator privileges:[8][9]

  • Running an Application as an Administrator
  • Changes to system-wide settings or to files in %SystemRoot% or %ProgramFiles%
  • Installing and uninstalling applications
  • Installing device drivers
  • Installing ActiveX controls
  • Changing settings for Windows Firewall
  • Changing UAC settings
  • Configuring Windows Update
  • Adding or removing user accounts
  • Changing a user’s account type
  • Configuring Parental Controls
  • Running Task Scheduler
  • Restoring backed-up system files
  • Viewing or changing another user’s folders and files
  • Running Disk Defragmenter

Common tasks, such as changing the time zone, do not require administrator privileges[10] (although changing the system time itself does, since the system time is commonly used in security protocols such as Kerberos). A number of tasks that required administrator privileges in earlier versions of Windows, such as installing critical Windows updates, no longer do so in Vista.[11] Any program can be run as administrator by right-clicking its icon and clicking "Run as administrator", except MSI or MSU packages as, due to their nature, if administrator rights will be required a prompt will usually be shown. Should this fail, the only workaround is to run a Command Prompt as an administrator and launch the MSI or MSP package from there.


User Account Control asks for credentials in a Secure Desktop mode, where the entire screen is temporarily dimmed, Windows Aero disabled, and only the authorization window at full brightness, to present only the elevation user interface (UI). Normal applications cannot interact with the Secure Desktop. This helps prevent spoofing, such as overlaying different text or graphics on top of the elevation request, or tweaking the mouse pointer to click the confirmation button when that's not what the user intended.[12] If an administrative activity comes from a minimized application, the secure desktop request will also be minimized so as to prevent the focus from being lost. It is possible to disable Secure Desktop, though this is inadvisable from a security perspective.[13]

Applications written with the assumption that the user will be running with administrator privileges experienced problems in earlier versions of Windows when run from limited user accounts, often because they attempted to write to machine-wide or system directories (such as Program Files) or registry keys (notably HKLM).[4] UAC attempts to alleviate this using File and Registry Virtualization, which redirects writes (and subsequent reads) to a per-user location within the user's profile. For example, if an application attempts to write to a directory such as "C:\Program Files\appname\settings.ini" to which the user does not have write permission, the write will be redirected to "C:\Users\username\AppData\Local\VirtualStore\Program Files\appname\settings.ini". The redirection feature is only provided for non-elevated 32-bit applications, and only if they do not include a manifest that requests specific privileges.[14]

There are a number of configurable UAC settings. It is possible to:[15]

  • Require administrators to re-enter their password for heightened security;
  • Require the user to press Ctrl+Alt+Del as part of the authentication process for heightened security;
  • Disable only file and registry virtualization [16]
  • Disable Admin Approval Mode (UAC prompts for administrators) entirely; note that, while this disables the UAC confirmation dialogs, it does not disable Windows' built-in LUA feature, which means that users, even those marked as administrators, are still limited users with no true administrative access.

Command Prompt windows that are running elevated will prefix the title of the window with the word "Administrator", so that a user can discern which instances are running with elevated privileges.[17]

A distinction is made between elevation requests from a signed executable and an unsigned executable; and if the former, whether the publisher is 'Windows Vista'. The color, icon, and wording of the prompts are different in each case; for example, attempting to convey a greater sense of warning if the executable is unsigned than if not.[18]

Internet Explorer 7's "Protected Mode" feature uses UAC to run with a 'low' integrity level (a Standard user token has an integrity level of 'medium'; an elevated (Administrator) token has an integrity level of 'high'). As such, it effectively runs in a sandbox, unable to write to most of the system (apart from the Temporary Internet Files folder) without elevating via UAC.[6][19] Since toolbars and ActiveX controls run within the Internet Explorer process, they will run with low privileges as well, and will be severely limited in what damage they can do to the system.[20]

Requesting elevation

A program can request elevation in a number of different ways. One way for program developers is to add a requestedPrivileges section to an XML document, known as the manifest, that is then embedded into the application. A manifest can specify dependencies, visual styles, and now the appropriate security context:


Setting the level attribute for requestedExecutionLevel to "asInvoker" will make the application run with the token that started it, "highestAvailable" will present a UAC prompt for administrators and run with the usual reduced privileges for standard users, and "requireAdministrator" will require elevation.[21] In both highestAvailable and requireAdministrator modes, failure to provide confirmation results in the program not being launched.

An executable that is marked as "requireAdministrator" in its manifest cannot be started from a non-elevated process using CreateProcess(). Instead, ERROR_ELEVATION_REQUIRED will be returned. ShellExecute() or ShellExecuteEx() must be used instead. If an HWND is not supplied, then the dialog will show up as a blinking item in the taskbar.

Inspecting an executable's manifest to determine if it requires elevation is not recommended, as elevation may be required for other reasons (setup executables, application compatibility). However, it is possible to programmatically detect if an executable will require elevation by using CreateProcess() and setting the dwCreationFlags parameter to CREATE_SUSPENDED. If elevation is required, then ERROR_ELEVATION_REQUIRED will be returned.[22] If elevation is not required, a success return code will be returned at which point one can use TerminateProcess() on the newly created, suspended process. This will not allow one to detect that an executable requires elevation if one is already executing in an elevated process, however.

A new process with elevated privileges can be spawned from within a .NET application using the "runas" verb. An example using C#:

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "C:\\Windows\\system32\\notepad.exe";
proc.StartInfo.Verb = "runas"; // Elevate the application
proc.StartInfo.UseShellExecute = true;

In a native Win32 application the same "runas" verb can be added to a ShellExecute() or ShellExecuteEx() call.[6]

ShellExecute(hwnd, "runas", "C:\\Windows\\Notepad.exe", 0, 0, SW_SHOWNORMAL);

In the absence of a specific directive stating what privileges the application requests, UAC will apply heuristics, to determine whether or not the application needs administrator privileges. For example, if UAC detects that the application is a setup program, from clues such as the filename, versioning fields, or the presence of certain sequences of bytes within the executable, in the absence of a manifest it will assume that the application needs administrator privileges.[23]


There have been complaints that UAC notifications slow down various tasks on the computer such as the initial installation of software onto Windows Vista.[24] It is possible to turn off UAC while installing software, and re-enable it at a later time.[25] However, this is not recommended since, as File & Registry Virtualization is only active when UAC is turned on, user settings and configuration files may be installed to a different place (a system directory rather than a user-specific directory) if UAC is switched off than they would be otherwise.[26] Also Internet Explorer 7's "Protected Mode", whereby the browser runs in a sandbox with lower privileges than the standard user, relies on UAC; and will not function if UAC is disabled.[19]

Yankee Group analyst Andrew Jaquith stated that "while the new security system shows promise, it is far too chatty and annoying."[27] However, this statement was made over six months before Vista was actually released (even before Beta 2 was released). By the time Windows Vista was released in November 2006, Microsoft had drastically reduced the number of operating system tasks that triggered UAC prompts, and added file and registry virtualization to reduce the number of legacy applications that trigger UAC prompts.[4] However, David Cross, a product unit manager at Microsoft, stated during the RSA Conference 2008 that UAC was in fact designed to "annoy users," and force independent software vendors to make their programs more secure so that UAC prompts would not be triggered.[28] Software written for Windows XP as well as many peripherals would no longer work in Windows Vista or 7 due to the extensive changes made in the introduction of UAC. The compatibility options were also insufficient. In response to these criticisms, Microsoft has altered UAC activity in Windows 7. For example, by default users are not prompted to confirm actions initiated with the mouse and keyboard alone such as operating Control Panel applets. New York Times Gadgetwise writer Stephen Williams says: "One recommended way to wring more speed from Vista is to turn off the overly protective User Account Control whose pop-ups are like having your mother hover over your shoulder while you work."[29]

See also


  1. ^ Windows 7 Feature Focus: User Account Control, An overview of UAC in Windows 7 by Paul Thurott
  2. ^ "The Windows Vista and Windows Server 2008 Developer Story: Windows Vista Application Development Requirements for User Account Control (UAC)". The Windows Vista and Windows Server 2008 Developer Story Series.  
  3. ^ Marc Silbey, Peter Brundrett (January 2006). "Understanding and Working in Protected Mode Internet Explorer".  
  4. ^ a b c Torre, Charles (March 5, 2007). "UAC - What. How. Why." (video). Retrieved 2007-12-08. 
  5. ^  
  6. ^ a b c Kerr, Kenny (September 29, 2006). "Windows Vista for Developers – Part 4 – User Account Control". Retrieved 2007-03-15. 
  7. ^
  8. ^ Bott, Ed (2007-02-02). "What triggers User Account Control prompts?". 
  9. ^ "Living with and benefiting from User Account Control".  
  10. ^  
  11. ^ "User Account Control Overview". Technet.  
  12. ^ "User Account Control Prompts on the Secure Desktop". UACBlog. MSDN Blogs. 2006-05-03. Retrieved 2007-02-25. 
  13. ^ Bott, Ed (February 2, 2007). "Why you need to be discriminating with those Vista tips". Ed Bott's Windows Expertise. Retrieved 2007-12-08. 
  14. ^ "Determine How to Fix Applications That Are Not Windows 7 Compliant". Microsoft. Retrieved 2013-09-09. 
  15. ^ "Chapter 2: Defend Against Malware". Windows Vista Security Guide.  
  16. ^ User Account Control: Virtualize file and registry write failures to per-user locations
  17. ^ "Administrator Marking for Command Prompt". UACBlog. MSDN Blogs. August 1, 2006. Retrieved 2006-08-07. 
  18. ^ "Accessible UAC Prompts". Windows Vista Blog. Microsoft. 
  19. ^ a b Russinovich, Mark (June 2007). "Inside Windows Vista User Account Control".  
  20. ^ Friedman, Mike. "Protected Mode in Vista IE7". IEBlog. 
  21. ^ Mike Carlisle (2007-03-10). "Making Your Application UAC Aware". The Code Project. Retrieved 2007-03-15. 
  22. ^ Junfeng Zhang (2006-10-18). "Programmatically determine if an application requires elevation in Windows Vista". MSDN Blogs. Retrieved 2008-01-24. 
  23. ^ "Understanding and Configuring User Account Control in Windows Vista".  
  24. ^ "Disabling the UAC feature". 2007-03-10. Retrieved 2007-03-10. 
  25. ^ "Disable UAC in Vista". 
  26. ^ Bott, Ed (2007-02-02). "Why you need to be discriminating with those Vista tips". Ed Bott's Windows Expertise. Retrieved 2007-07-05. 
  27. ^ Evers, Joris (2006-05-07). "Report: Vista to hit anti-spyware, firewall markets".  
  28. ^ [1]Microsoft: Vista feature designed to 'annoy users' | Cnet
  29. ^ Gadgetwise, New York Times, May 14, 2008.

External links

  • Turning UAC On or Off in Windows 7
  • Documentation about UAC for Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista
  • UAC Understanding and Configuring More Information at Microsoft Technet
  • Development Requirements for User Account Control Compatibility More information at Microsoft Developer Network
  • UAC Team Blog
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.