【问题标题】:requestedExecutionLevel in manifest does not work properly on windows server 2003清单中的 requestedExecutionLevel 在 Windows Server 2003 上无法正常工作
【发布时间】:2014-02-24 03:03:36
【问题描述】:

我在 Windows Server 2003 上运行 C# 应用程序时遇到问题。我的内部清单文件包含以下几行

  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>

它适用于 Windows 7 或 8,当用户尝试在没有管理员权限的情况下运行应用程序时会提示 UAC。但是在 windows server 2003 上,用户可以在没有管理员权限的情况下启动它,并且不会提示 UAC,因此应用程序无法正常工作。

【问题讨论】:

    标签: c# manifest windows-server-2003 uac


    【解决方案1】:

    UAC 在 Windows Server 2003 中根本不存在,它仅在 Windows Vista 和 Windows Server 2008 中引入。

    您的应用程序必须接受它可以在没有管理权限的情况下启动。因此,它必须执行自己的管理权限检查,如果它发现它是由管理员以外的其他人运行的,它应该告诉用户然后退出。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-12-04
      • 2020-08-04
      • 2016-04-11
      • 1970-01-01
      • 2011-09-11
      • 1970-01-01
      • 2013-03-04
      • 2011-04-22
      相关资源
      最近更新 更多