用户帐户控制User Account Control

备注

此设计指南是为 Windows 7 创建的,并且尚未更新为较新版本的 Windows。This design guide was created for Windows 7 and has not been updated for newer versions of Windows. 本指南中的大部分内容仍适用,但演示和示例并不反映我们 当前的设计指导Much of the guidance still applies in principle, but the presentation and examples do not reflect our current design guidance.

设计良好的用户帐户控制体验可帮助防止意外的系统范围的更改,这种更改是可预测的并且需要最少的工作量。A well designed User Account Control experience helps prevent unwanted system-wide changes in a way that is predictable and requires minimal effort.

使用用户帐户控制 (UAC) 完全启用的交互式管理员通常使用最少的用户特权运行,但他们可以通过向同意 UI 授予显式同意来执行管理任务。With User Account Control (UAC) fully enabled, interactive administrators normally run with least user privileges, but they can self-elevate to perform administrative tasks by giving explicit consent with the Consent UI. 此类管理任务包括安装软件和驱动程序、更改系统范围的设置、查看或更改其他用户帐户以及运行管理工具。Such administrative tasks include installing software and drivers, changing system-wide settings, viewing or changing other user accounts, and running administrative tools.

在最小特权状态下,管理员被称为受保护的管理员。In their least-privileged state, administrators are referred to as Protected administrators. 在其提升状态下,它们被称为 "提升的管理员"。In their elevated state, they are referred to as Elevated administrators. 相反,标准用户不能自行提升,但他们可以要求管理员使用凭据 UI 提升这些用户的权限。By contrast, Standard users can't elevate by themselves, but they can ask an administrator to elevate them using the Credential UI. 内置的管理员帐户不需要提升权限。The Built-in Administrator account doesn't require elevation.

"允许程序" 安全消息的屏幕截图screen shot of 'allow program' security message

许可用户界面,用于提升受保护的管理员拥有管理权限。The Consent UI, used to elevate Protected administrators to have administrative privileges.

请求密码的消息屏幕截图screen shot of message asking for password

用于提升标准用户的凭据 UI。The Credential UI, used to elevate Standard users.

UAC 具有以下优势:UAC provides the following benefits:

  • 它可减少使用提升的权限运行的程序的数量,从而有助于防止用户意外更改其系统设置,并帮助防止 "恶意软件" 获得系统范围的访问权限。It reduces the number of programs that run with elevated privileges, therefore helping to prevent users from accidentally changing their system settings, and helping to prevent "malware" from gaining system-wide access. 当提升被拒绝时,恶意软件只能影响当前用户的数据。When elevation is denied, malware is only able to affect the current user's data. 如果没有提升,恶意软件就不能进行系统范围的更改,也不会影响其他用户。Without elevation, malware can't make system-wide changes or affect other users.
  • 对于 托管环境而言,设计良好的 UAC 体验可让用户通过删除不必要的限制以标准用户的身份运行,从而提高工作效率。For managed environments, well designed UAC experiences allow users to be more productive when running as Standard users by removing unnecessary restrictions.
  • 它使标准用户能够要求管理员向他们授予在其当前会话中执行管理任务的权限。It gives Standard users the ability to ask administrators to give them permission to perform administrative tasks within their current session.
  • 对于家庭环境,它可以更好地控制系统范围的更改,包括安装的软件。For home environments, it enables better parental control over system-wide changes, including what software is installed.

开发人员: 有关实现的信息,请参阅为 UAC 兼容性重新设计用户界面Developers: For implementation information, see Redesign Your UI for UAC Compatibility.

在 Windows Vista 中,受保护的管理员可以选择接收所有系统更改的通知,也可以选择 "无"。In Windows Vista, Protected administrators can choose to be notified about all system changes or none. 默认情况下,UAC 默认设置是通知所有更改,而不考虑其来源。The UAC default setting is to notify about all changes, no matter what their origin. 收到通知后,你的桌面将灰显,并且你必须在 UAC 对话框中批准或拒绝该请求,然后才能在你的计算机上执行其他任何操作。When you're notified, your desktop will be dimmed, and you must either approve or deny the request in the UAC dialog box before you can do anything else on your computer. 桌面变暗会被称为 安全桌面 ,因为当其他程序变暗时无法运行。The dimming of your desktop is referred to as the secure desktop because other programs can't run while it's dimmed.

除了 Windows Vista 中的两个以外,windows 7 还为受保护的管理员引入了两个中间 UAC 设置。Windows 7 introduces two intermediate UAC settings for Protected administrators, in addition to the two from Windows Vista. 第一种是仅当程序进行更改时才通知用户,因此当管理员自行进行更改时,系统会自动提升其权限。The first is to notify users only when a program is making the change, so administrators are automatically elevated when they make a change themselves. 这是 Windows 7 中的 UAC 默认设置,它还利用了安全桌面。This is the UAC default setting in Windows 7, and it also makes use of the secure desktop.

Windows 7 中的第二个中间设置与第一个相同,只不过它不使用安全桌面。The second intermediate setting in Windows 7 is the same as the first except that it doesn't use the secure desktop.

windows 7 中的四个 uac 设置的屏幕截图screen shot of four uac settings in windows 7

Windows 7 引入了两个中间 UAC 设置。Windows 7 introduces two intermediate UAC settings.

注意: 与编写 代码以支持用户帐户控制 相关的准则显示在单独的文章中。Note: Guidelines related to writing code to support User Account Control are presented in a separate article.

设计概念Design concepts

目标Goals

设计良好的用户帐户控制体验具有以下目标:A well designed User Account Control experience has the following goals:

  • 消除不必要的提升。Eliminate unnecessary elevation. 用户只需提升即可执行需要管理特权的任务。Users should have to elevate only to perform tasks that require administrative privileges. 所有其他任务应该设计为无需提升权限。All other tasks should be designed to eliminate the need for elevation. 通常,旧版软件需要管理员权限,不需要写入 HKLM 或 HKCR 注册表部分,或程序文件或 Windows 系统文件夹。Often legacy software requires administrator privileges unnecessarily by writing to the HKLM or HKCR registry sections, or the Program Files or Windows System folders.
  • 可预测。Be predictable. 标准用户需要知道哪些任务需要管理员执行或无法在托管环境中执行。Standard users need to know which tasks require an administrator to perform or cannot be performed at all in managed environments. 管理员需要知道哪些任务需要提升权限。Administrators need to know which tasks require elevation. 如果他们无法准确预测提升的需求,则他们可能会在不应该同意的情况下为管理任务提供同意。If they can't predict the need for elevation accurately, they are more likely to give consent for administrative tasks when they shouldn't.
  • 需要最少的工作量。Require minimal effort. 需要管理特权的任务应该设计为需要一个提升。Tasks that require administrative privileges should be designed to require a single elevation. 需要多次提升的任务很快就会变得枯燥乏味。Tasks that require multiple elevations quickly become tedious.
  • 恢复到最小特权。Revert to least privileges. 完成需要管理权限的任务后,程序应还原到最小特权状态。Once a task that requires administrative privileges is complete, the program should revert to the least privilege state.

提升任务流Elevation task flow

当任务需要提升时,它会执行以下步骤:When a task requires elevation, it has the following steps:

  1. 入口点。Entry point. 当 UAC 完全启用时需要立即提升的任务具有使用 UAC 盾牌标记的入口点。Tasks that require immediate elevation when UAC is fully enabled have entry points marked with the UAC shield. 在这种情况下,用户应该在单击此类命令后立即看到一个提升 UI,当他们看到没有盾牌的任务的提升 UI 时,应格外小心。In this case, users should expect to see an Elevation UI immediately after clicking such commands and they should be extra cautious when they see Elevation UI from tasks that don't have a shield.

    uac 盾牌图标及其标签的屏幕截图screen shot of uac shield icons and their labels

    在此示例中,"家长控制" 和 "用户帐户" 控制面板项需要提升权限。In this example, the parental control and user accounts control panel items require elevation.

    如果 UAC 已部分启用或完全关闭,则仍将显示 UAC 盾牌,以指示该任务涉及系统级更改,因此需要提升权限,即使用户可能看不到提升 UI 也是如此。When UAC is partially enabled or turned off completely, the UAC shield is still displayed to indicate that the task involves system-level changes and therefore requires elevation, even if the user might not see Elevation UI. 对于需要提升的任务,始终显示 UAC 盾牌会使 UI 简单且可预测。Always displaying the UAC shield for tasks that require elevation keeps the UI simple and predictable.

  2. 仰角.Elevation. 对于受保护的管理员,该任务使用同意 UI 请求同意。For Protected Administrators, the task requests consent using the Consent UI. 对于标准用户,该任务使用凭据 UI 请求管理员凭据。For Standard users, the task requests administrator credentials using the Credential UI.

    两种提升类型的屏幕截图screen shot of two types of elevation

    这些示例显示凭据 UI 和同意 UI。These examples show the Credential UI and the Consent UI.

  3. 单独的提升进程。Separate elevated process. 在内部,将创建一个新的提升进程来执行任务。Internally, a new elevated process is created to perform the task.

  4. 恢复到最小特权。Revert to least privilege. 如有必要,请还原到最低权限,以完成无需提升的任何步骤。If necessary, revert to least privilege to complete any steps that don't require elevation.

请注意,任务不会 "记住" 提升状态。Note that tasks don't "remember" elevated states. 例如,如果用户在向导中的提升入口点上来回导航,则用户必须每次提升。For example, if the user navigates back and forth over an elevation entry point in a wizard, the user must elevate each time.

使用模式Usage patterns

用户帐户控制具有几个使用模式 (按优先顺序) :User Account Control has several usage patterns (in order of preference):

  1. 适用于标准用户。Work for Standard users. 为所有用户设计功能,方法是将其范围限制为当前用户。Design the feature for all users by limiting its scope to the current user. 通过将设置限制到当前用户 (而不是系统范围的) 中,无需完全提升 UI,并使用户能够完成任务。By limiting settings to the current user (as opposed to system-wide), you eliminate the need for an Elevation UI entirely, and enable users to complete the task.

    不正确:Incorrect:

    消息屏幕截图:你没有权限screen shot of message: you do not have privilege

    在此示例中,Windows XP 用户必须具有管理权限才能查看或更改当前时区。In this example, Windows XP users had to have administrative privileges to view or change the current time zone.

    正确:Correct:

    "日期和时间" 对话框的屏幕截图screen shot of date and time dialog box

    在此示例中,在 Windows 7 和 Windows Vista 中对时区功能进行了重新设计,使其适用于所有用户。In this example, the time zone feature was redesigned in Windows 7 and Windows Vista to work for all users.

  2. 为标准用户和管理员提供单独的 UI 元素。Have separate UI elements for Standard users and administrators. 从管理任务中清楚地分隔标准用户任务。Clearly separate Standard user tasks from administrative tasks. 让所有用户都可以访问有用的只读信息。Give all users access to useful read-only information. 通过 UAC 盾牌清楚地识别管理任务。Clearly identify administrative tasks with the UAC shield.

    显示所需提升的 uac 盾牌图形graphic of uac shield showing elevation required

    在此示例中,系统控制面板项向所有用户显示其状态,但更改系统范围的设置需要提升权限。In this example, the System control panel item shows its state to all users, but changing the system-wide settings requires elevation.

  3. 允许标准用户尝试任务,并在失败时进行提升。Allow Standard users to attempt task, and to elevate on failure. 如果标准用户可以查看信息,并且能够进行一些更改而无需提升权限,则允许用户访问 UI 并仅在任务失败时使它们提升。If Standard users can view the information and are able to make some changes without elevation, allow them to access the UI and have them elevate only if the task fails. 这种方法适用于标准用户访问权限受限的情况,例如 Windows 资源管理器中的文件的属性。This approach is suitable when Standard users have limited access, such as with properties of their own files in Windows Explorer. 它还适用于控制面板混合中心页面上的设置。It is also suitable for settings on Control Panel hybrid hub pages.

    拒绝访问的屏幕截图消息screen shot of access is denied message

    在此示例中,用户试图更改程序文件属性,但没有足够的权限。In this example, the user attempted to change program file properties but didn't have sufficient privileges. 用户可以进行提升,然后重试。The user can elevate and try again.

  4. 仅适用于管理员。Work for administrators only. 仅对管理员功能和程序使用此方法!Use this approach only for administrator features and programs! 如果功能仅供管理员使用 (并且没有导航路径或) 标准用户的有用只读信息,你可以在显示任何用户界面之前,在入口点提示你提供管理员凭据。If a feature is intended only for administrators (and has no navigation paths or useful read-only information for Standard users), you can prompt for administrator credentials at the entry point before showing any UI. 当所有路径都需要管理特权时,使用此方法来处理较长的向导和 页面流Use this approach for lengthy wizards and page flows when all paths require administrative privileges.

    如果整个程序仅适用于管理员,请将其标记为提示提供管理员凭据,以便启动。If the entire program is for administrators only, mark it to prompt for administrator credentials in order to launch. Windows 将显示包含 UAC 盾牌覆盖的程序图标。Windows displays such program icons with the UAC shield overlay.

    windows 徽标和 uac 盾牌覆盖的屏幕截图screen shot of windows logo and uac shield overlay

    在此示例中,程序需要管理权限才能启动。In this example, the program requires administrative privileges to launch.

指南Guidelines

UAC 盾牌图标UAC shield icon

  • 用 uac 盾牌显示控件,以指示当 uac 完全启用时任务需要立即提升, 即使 uac 当前未完全启用也是如此。Display controls with the UAC shield to indicate that the task requires immediate elevation when UAC is fully enabled, even if UAC isn't currently fully enabled. 如果向导和 页面流 的所有路径都需要提升,请在任务的入口点显示 UAC 盾牌。If all paths of a wizard and page flow require elevation, display the UAC shield at the task's entry point. 正确使用 UAC 盾牌有助于用户预测何时需要提升权限。Proper use of the UAC shield helps users predict when elevation is required.

  • 如果程序支持多个版本的 Windows,则在至少有一个版本需要提升的情况下显示 UAC 盾牌。If your program supports multiple versions of Windows, display the UAC shield if at least one version requires elevation. 由于 Windows XP 不需要提升权限,因此,如果您能够以一致的方式而不会导致性能不受损害,则请考虑删除 Windows XP 的 UAC 防护。Because Windows XP never requires elevation, consider removing the UAC shields for Windows XP if you can do so consistently and without harming performance.

  • 对于在大多数上下文中不需要提升的任务,不显示 UAC 盾牌。Don't display the UAC shield for tasks that don't require elevation in most contexts. 由于这种方法有时会产生误导,因此,首选方法是改用正确屏蔽的上下文命令。Because this approach will sometimes be misleading, the preferred approach is to use a properly shielded contextual command instead.

    windows 资源管理器中照片文件的屏幕截图screen shot of photo files in windows explorer

    由于新的文件夹命令仅在系统文件夹中使用时才需要提升,因此在没有 UAC 盾牌的情况下会显示它。Because the New folder command requires elevation only when used in system folders, it is displayed without a UAC shield.

  • UAC 盾牌可显示在以下控件上:The UAC shield can be displayed on the following controls:

    命令按钮:Command buttons:

    带有 uac 盾牌图标的命令按钮的屏幕截图screen shot of command button with uac shield icon

    需要立即提升的命令按钮。A command button that requires immediate elevation.

    命令链接:Command links:

    带有 uac 盾牌图标的命令链接屏幕截图screen shot of command link with uac shield icon

    需要立即提升的命令链接。A command link that requires immediate elevation.

    链接Links:

    带有 uac 盾牌的更改帐户链接的屏幕截图screen shot of change account link with uac shield

    需要立即提升的链接。A link that requires immediate elevation.

    弹出式Menus:

    带有 uac 盾牌的菜单的屏幕截图screen shot of menu with uac shield

    需要立即提升的下拉菜单。A drop-down menu that requires immediate elevation.

  • 因为任务不记得提升的状态,请 不要更改 UAC 盾牌来反映状态。Because tasks don't remember elevated states, don't change the UAC shield to reflect state.

  • 显示 UAC 盾牌,即使已关闭用户帐户控制或用户正在使用内置管理员帐户。Display the UAC shield even if User Account Control has been turned off or the user is using the Built-in Administrator account. 始终显示 UAC 盾牌更易于编程,并为用户提供有关任务性质的信息。Consistently displaying the UAC shield is easier to program, and provides users with information about the nature of the task.

ElevationElevation

  • 如果可能,请在不提升的情况下由标准用户执行设计任务。Whenever possible, design tasks to be performed by Standard users without elevation. 让所有用户都可以访问有用的只读信息。Give all users access to useful read-only information.

  • 基于每个任务进行提升,而不是基于每个设置。Elevate on a per task basis, not on a per setting basis. 不要在单个页面或对话框中使用管理设置来混合标准用户设置。Don't mix Standard user settings with administrative settings in a single page or dialog box. 例如,如果标准用户可以更改部分(而不是所有)设置,请将这些设置拆分为单独的 UI 图面。For example, if Standard users can change some but not all settings, split those settings out as a separate UI surface.

    不正确:Incorrect:

    "日期和时间设置" 对话框的屏幕截图screen shot of date and time settings dialog box

    在此示例中,标准用户设置与管理设置错误地混合。In this example, Standard user settings are incorrectly mixed with administrative settings.

    正确:Correct:

    不带 uac 防护的相同对话框的屏幕截图screen shot of same dialog box without uac shields

    在此示例中,更改日期和时间的设置位于单独的对话框中,仅供管理员使用。In this example, the settings for changing the date and time are in a separate dialog box, available only to administrators. 时区设置对标准用户可用,不与管理设置混合使用。The time zone settings are available to Standard users, and are not mixed with administrative settings.

  • 确定控件应显示还是应禁用时,不要考虑是否需要提升。Don't consider the need to elevate when determining if a control should be displayed or disabled. 这是因为:This is because:

    • 在非托管环境中,假设标准用户可以通过请求管理员进行提升。In unmanaged environments, assume that Standard users could elevate by asking an administrator. 禁用需要提升的控件将阻止用户让管理员提升权限。Disabling controls that require elevation would prevent users from having administrators elevate.
    • 在托管环境中,假设标准用户根本无法进行提升。In managed environments, assume that Standard users can't elevate at all. 删除需要提升的控件将会阻止用户了解何时停止查找。Removing controls that require elevation would prevent users from knowing when to stop looking.
  • 消除不必要的提升:To eliminate unnecessary elevation:

    • 如果任务可能需要提升,请尽可能晚地提升。If a task might require elevation, elevate as late as possible. 如果任务需要 确认,只需在用户确认后显示提升 UI。If a task needs a confirmation, display the elevation UI only after the user has confirmed. 如果任务始终需要提升,请在其入口点提升。If a task always requires elevation, elevate at its entry point.
    • 提升后,请保持提升状态,直到不再需要提升的权限。Once elevated, stay elevated until elevated privileges are no longer necessary. 用户不必多次提升即可执行单个任务。Users shouldn't have to elevate multiple times to perform a single task.
    • 如果用户必须提升才能进行更改,但选择不进行任何更改,请启用 "提交" 按钮,但将提交处理为 "取消"。If users must elevate to make a change but choose not to make any changes, leave the positive commit buttons enabled but handle the commit as a cancel. 这样做可以避免用户只需提升即可关闭窗口。Doing so eliminates users having to elevate just to close a window.
    • 不正确:Incorrect:
    • 仅活动一个按钮的窗口的屏幕截图screen shot of window with only one button active
    • 在此示例中,"保存更改" 按钮已禁用,以避免不必要的提升,但当用户更改所选内容时,将启用该按钮。In this example, the Save Changes button is disabled to avoid an unnecessary elevation, but becomes enabled when users change the selection. 不过,禁用的 "提交" 按钮使其看起来像是用户没有选择。However, the disabled commit button makes it look like users really don't have a choice.
  • 当任务失败时不显示错误消息,因为用户选择不提升。Don't display an error message when tasks fail because users chose not to elevate. 假设用户特意选择不继续,因此它们不会将此情况视为错误。Assume that users intentionally chose not to proceed, so they won't regard this situation as an error.

    不正确:Incorrect:

    消息屏幕截图: fabrikam 还原无法运行screen shot of message: fabrikam restore can't run

    在此示例中,当用户决定不提升时,Fabrikam 还原会错误地提供错误消息。In this example, Fabrikam Restore incorrectly gives an error message when the user decides to not elevate.

  • 不要显示警告,说明用户可能需要提升其权限才能执行任务。Don't display warnings to explain that users might need to elevate their privileges to perform tasks. 让用户自行发现这一事实。Let users discover this fact on their own.

  • 根据下表显示 UAC 盾牌和提升 UI:Display the UAC shield and elevation UI based on the following table:

    ObjectObject Circumstance UAC 盾牌的放置位置Where to put UAC shield 提升时间When to elevate
    节目Program
    整个计划仅适用于管理员。Entire program is for administrators only.
    windows 徽标和 uac 盾牌覆盖的屏幕截图screen shot of windows logo and uac shield overlay
    程序图标上的 UAC 盾牌覆盖。UAC shield overlay on program icon.
    启动时显示提升 UI。Display elevation UI at launch.
    CommandCommand
    整个命令仅适用于管理员。Entire command is for administrators only.
    更改帐户链接和 uac 盾牌的屏幕截图screen shot of change account link and uac shield
    命令按钮或链接上的 UAC 盾牌。UAC shield on command button or link.
    在单击命令按钮或链接时显示提升 UI,但在任何确认后显示。Display elevation UI when command button or link is clicked, but after any confirmations.
    CommandCommand
    命令显示适用于所有用户的有用只读信息,但更改需要管理权限。Command displays useful read-only information appropriate for all users, but changes require administrative privileges.
    "更改设置" 链接的屏幕截图和 uac 盾牌screen shot of change settings link and uac shield
    UAC 盾牌 on 命令按钮或链接以进行更改。UAC shield on command button or link to make changes.
    当单击命令按钮时,但在任何确认之后显示提升 UI。Display elevation UI when command button is clicked, but after any confirmations.
    CommandCommand
    标准用户可以查看信息,还可以在不进行提升的情况下进行一些更改。Standard users can view the information and possibly make some changes without elevation. 允许标准用户尝试,并在失败时进行提升。allow standard users to attempt, and to elevate on failure.
    "重试时出现 uac 的错误" 图标的屏幕截图screen shot of error with uac icon on retry button
    不要显示该命令的 UAC 防护程序,但如果该命令失败,则将其显示为提升入口点。Don't show the UAC shield for the command, but show it for the elevation entry point if the command fails.
    用户重试命令时显示提升 UI。Display elevation UI when user retries the command.
    任务步骤Task step
    所有后续步骤都需要提升权限。All subsequent steps require elevation.
    带有 uac 盾牌的 "下一命令" 按钮的屏幕截图screen shot of next command button with uac shield
    "下一步" 按钮上的 UAC 防护 (或等效) 。UAC shield on Next button (or equivalent).
    单击 "下一步" 或 "其他提交" 按钮时显示提升 UI。Display elevation UI when Next or other commit button is clicked.
    任务步骤Task step
    某些分支需要提升权限。Some branches require elevation.
    带有 uac 盾牌的命令链接屏幕截图screen shot of command link with uac shield
    需要提升的命令链接上的 UAC 盾牌。UAC shield on command links that require elevation.
    单击带有 UAC 盾牌的命令链接时显示提升 UI。Display elevation UI when command links with UAC shield are clicked.

提升 UIElevation UI

  • 如果用户提供的帐户 (名称或密码无效) 或没有管理员权限,只需重新显示凭据 UI 即可。If the user provides an account that isn't valid (name or password) or doesn't have administrator privileges, just redisplay the Credential UI. 不显示错误消息。Don't display an error message.
  • 如果用户取消凭据 UI,请将用户返回到原始 UI。If the user cancels the Credential UI, return the user back to the original UI. 不显示错误消息。Don't display an error message.
  • 如果用户帐户控制已关闭并且标准用户尝试执行需要提升的任务,则提供一条错误消息,指出 "此任务需要管理员权限。If User Account Control has been turned off and a Standard user attempts to perform a task that requires elevation, provide an error message that states "This task requires administrator privileges. 若要执行此任务,必须使用管理员帐户登录。To perform this task, you must log on using an administrator account."

任务的屏幕截图需要权限消息screen shot of task requires privileges message

在此示例中,用户帐户控制已关闭,因此出现一条错误消息,说明用户必须使用管理员帐户。In this example, User Account Control has been turned off so an error message explains that the user must use an administrator account.

向导Wizards

  • 不要多次提升。Don't elevate multiple times. 向导提升后,应保持提升权限。Once a wizard is elevated, it should stay elevated.
  • 如果在向导中执行任务,请在 "提交" 页的 "下一步" 按钮上放置一个 UAC 盾牌 (应为其提供更 具体的标签) 。If the task is performed within the wizard, put a UAC shield on the Commit page's "Next" button (which should be given a more specific label). 当用户提交:When the user commits:
    • 如果下一页是 "进度" 页,请转到该页,并按模式模式显示提升 UI。If the next page is a Progress page, advance to that page and modally display the elevation UI. 成功提升后,执行任务。After successful elevation, perform the task.
    • 如果下一页是完成页,请转到该页 (,但会将其内容暂时替换为 "正在等待权限 ..." ) ,并按模式显示提升 UI。If the next page is a Completion page, advance to that page (but temporarily replace its contents with "Waiting for permission...") and modally display the elevation UI. 成功提升后,执行任务,然后显示完成页内容。After successful elevation, perform the task, and then display the Completion page contents.
    • 如果用户取消了提升 UI,请返回到 "提交" 页。If the user cancels the elevation UI, return to the Commit page. 这样,用户就可以重试。Doing so allows the user to try again.
  • 如果该任务在向导完成后执行,则将 UAC 盾牌置于提交页的 "完成" 按钮 (应该为其提供更 具体的标签) 。If the task is performed after the wizard completes, put a UAC shield on the Commit page's "Finish" button (which should be given a more specific label). 当用户提交:When the user commits:
    • 保留在 "提交" 页上,并按模式模式显示提升 UI。Remain on the Commit page and modally display the elevation UI. 成功提升后,关闭向导。After successful elevation, close the wizard.
    • 如果用户取消了提升 UI,请返回到 "提交" 页。If the user cancels the elevation UI, return to the Commit page. 这样,用户就可以重试。Doing so allows the user to try again.
  • 对于仅用于管理员的较长向导,你可以在显示任何用户界面之前,在入口点提示你提供管理员凭据。For lengthy wizards intended only for administrators, you can prompt for administrator credentials at the entry point before showing any UI.

文本Text

  • 不要使用省略号,因为命令需要提升。Don't use an ellipsis just because a command requires elevation. UAC 盾牌表明需要提升。The need to elevate is indicated with the UAC shield.

文档Documentation

引用用户帐户控制时:When referring to User Account Control:

  • 请参阅用户帐户控制 (的功能。第一次提及时) 或 UAC) (,而不是最低权限的用户帐户或 LUA。Refer to the feature as User Account Control (on first mention) or UAC (on subsequent mention), not Least-privileged User Account or LUA.
  • 作为标准用户引用非管理员。Refer to non-administrators as Standard users.
  • 请参阅内置管理员身份的内置计算机管理员。Refer to built-in computer administrators as Built-in administrators.

在用户文档中:In user documentation:

  • 请参阅向授权执行管理任务的行为。Refer to the act of giving consent to perform an administrative task as giving permission.

在编程和其他技术文档中:In programming and other technical documentation:

  • 请参阅同意将管理任务作为提升执行的操作。Refer to the act of giving consent to perform an administrative task as elevation.
  • 在 UAC 的上下文中,请在不提升的情况下,将管理员作为受保护的管理员,并且提升后的管理员。In the context of UAC, refer to administrators as Protected administrators when not elevated, and Elevated administrators after elevation.
  • 请参阅用于输入密码作为凭据 UI 的对话框。Refer to the dialog box used to enter passwords as the Credential UI. 请参阅用于授予许可的许可 UI 的对话框。Refer to the dialog box used to give consent as the Consent UI. 通常将这二者称为提升 UI。Refer to both generally as Elevation UI.