MSDN Documentation

User Account Control (UAC)

The User Account Control (UAC) is a security feature in Microsoft Windows operating systems designed to help prevent unauthorized changes to the computer. UAC works by notifying users when a program attempts to make changes that require administrator-level permissions, without the user having to log on or off the system.

Overview

UAC is implemented through a combination of technologies, including:

Key Concepts

Administrator Token

An administrator token is a security token assigned to users who are members of the Administrators group. This token contains all the privileges necessary to manage the system.

Filtered Token

When UAC is enabled, an administrator's token is filtered to remove administrative privileges for most applications. This filtered token is used by default and provides a standard user experience for most tasks.

Elevation

Elevation is the process by which an application is granted administrative privileges. This typically occurs when a user approves an elevation prompt.

UAC Prompts

UAC prompts are dialog boxes that appear when an application attempts to perform an action that requires administrative privileges. These prompts provide users with a clear indication of what action is being requested and allow them to grant or deny permission.

Programmatic Interaction

Developers can query the UAC status of a process or determine if the current user has administrative privileges. The following function is commonly used:

IsUserAnAdmin()

This function (or equivalent checks) can be used to determine if the current user is running with administrative privileges. However, note that even if a user is in the Administrators group, they might not be running with a full administrator token if UAC is enabled and they haven't elevated.

Note: It is recommended that applications not force UAC elevation unless absolutely necessary. Users should be given the choice to grant elevated permissions.

UAC Levels

UAC can be configured at different levels, affecting how often users are prompted:

Warning: Disabling UAC significantly reduces your computer's security and makes it more vulnerable to malware and unauthorized changes.

Related Topics