大网数据广告活动
域与目录服务

Group Policy is not applied to a user account for RunAs.exe or "Run as different user

· 52CE 我爱测

Provides some information for the issue where group Policy is not applied to a user account for RunAs.exe or "Run as different user

This article provides some information for the issue where Group Policy is not applied to a user account for RunAs.exe or "Run as different user".

Applies to:   Windows client (All supported versions)
Original KB number:   4569309

Summary

A Windows user can run a program or application as a different user. To do this, the user selects the Run as different user context menu command (or uses the Runas.exe command-line tool), and then specifies the credentials of an alternate account.

As a best practice, users should do their usual work on their workstations by using their own credentials. They can specify the credentials of an alternate account (such as an account that has elevated permissions) to run a specific application, as necessary.

However, when a user signs in by using alternate credentials, Windows does not process Group Policy settings for the alternate account. Windows processes Group Policy settings for a user account only if the user signs in to their own desktop by using the sign-in user interface. By contrast, when a user starts an application by using Runas.exe or Run as different user, Windows starts a separate process that runs under the alternate credentials. Such an operation does not trigger Group Policy processing.

This behavior is by design.

More information

Important:
Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it, back up the registry for restoration in case problems occur.

Group Policy settings are not intended to apply to the alternate user account that is specified by Runas.exe or Run as different user.

Runas.exe can load the user profile that is associated with the alternate account. If a user previously signed in to Windows on that workstation by using that account, the associated user profile might contain registry keys and values that were set by Group Policy processing events at that time. However, this behavior depends on whether the user includes the /noprofile switch in the command. If the user starts a process or application by using runas /noprofile, and then specifies the alternate account, Windows does not load the alternate user profile. Therefore, the alternate user profile does not provide a reliable way to apply Group Policy settings.

If you want to prevent users from using Runas.exe or Run as different user, follow these steps.

Important: After you apply these settings, any functionality that depends on the "Run as" feature does not work.

  1. Disable the Secondary Logon service (seclogon.exe).

  2. Use Software Restriction Policies or AppLocker to prevent access to the Runas.exe binary file.

  3. Use Group Policy to remove the Run as different user menu item. The Group Policy Object (GPO) changes to User Configuration\Administrative Templates\Start Menu and Taskbar\Show "Run as different user" command on Start.

  4. In the Windows registry, set the following entry:

    • Subkey: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\
    • Entry name: HideRunAsVerb
    • Type: DWORD
    • Value: 1

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Client · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。