Server 2008 R2 忽略我的应用程序清单(?)

发布于 2024-10-02 21:06:25 字数 888 浏览 1 评论 0原文

我正在开发一个针对 .NET 3.5 的 32 位应用程序; VS2010是我的开发工具。我的应用程序需要提升权限来执行各种操作,因此我有一个应用程序清单,其中包含以下行:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

因为这是正确的做法,所以清单中的行也表明该应用程序与Windows 7 和 Windows Vista:

<!--The ID below indicates application support for Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!--The ID below indicates application support for Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>

该应用程序在 Windows 7 和 Windows Vista 上运行良好。它立即弹出UAC提示,它不会受到注册表虚拟化等的影响。清单显然在那里工作。

然而,在 2008 R2 上,这些都不是真的。不出现UAC提示。注册表虚拟化发生了(我的主要问题)。就像它完全忽略了我的应用程序清单。我不知道去哪里看或检查什么。我在 7、Vista 和 2008 R2 上运行了完全相同的位,每次都得到完全相同的结果。我的 2008 R2 安装完全是普通的,因为它只是一个新安装的用于测试的虚拟机。

另外,我相当确定 Server 2008 的行为就像 2008 R2 一样,基本上忽略了清单。任何帮助将不胜感激!

I have a 32-bit application I'm working on that targets .NET 3.5; VS2010 is my development tool. My app requires elevated privileges for a variety of things, so I have an application manifest for it that has the following line in it:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

Because it's the right thing to do, I also have the lines in the manifest that indicate the application is compatible with Windows 7 and Windows Vista:

<!--The ID below indicates application support for Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!--The ID below indicates application support for Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>

The app runs great on Windows 7 and Windows Vista. It immediately pops up the UAC prompt, it does not get affected by registry virtualization, etc. The manifest is clearly working there.

However, on 2008 R2 none of these things are true. UAC prompt does not appear. Registry virtualization happens (my primary problem). It's like it's completely ignoring my application manifest. I have no idea where to look or what to check. I have run the exact same bits on 7, Vista, and 2008 R2 and get exactly the same results every time. My 2008 R2 install is completely vanilla, as it's just a freshly-installed VM for testing.

Also, I'm fairly sure that Server 2008 is acting just like 2008 R2, basically ignoring the manifest. Any help would be greatly appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无畏 2024-10-09 21:06:25

我已经找到了我自己问题的奇怪答案,尽管它分为两部分:

  • 出于某种原因,我在 2008 或 2008 R2 中都没有收到 UAC 提示,但在这两种情况下,应用程序都正常运行已正确提升应用程序虚拟化已禁用

  • 我的应用程序是 32 位,正在写入 Wow6432Node 注册表项,因此我认为虚拟化正在发生,因为我的更改没有出现。如果我在 2008 x86 上测试过(我没有测试过),我会发现更改出现在那里,但不在 x64 操作系统中。

I have figured out the strange answer to my own question, though it comes in two parts:

  • For some reason, I'm not getting a UAC prompt in either 2008 or 2008 R2, but in both cases the app is getting properly elevated and application virtualization is disabled correctly.

  • My app, being 32-bit, was writing into the Wow6432Node registry key, hence I thought virtualization was happening because my changes weren't appearing. If I had tested on 2008 x86, which I had not, I would have found that the changes were appearing there but not in the x64 OSs.

心碎无痕… 2024-10-09 21:06:25

Server 2008 R2默认关闭UAC。如果将其关闭,则管理员组中的用户拥有完整的管理员权限,而非管理员用户则没有这些权限,并且无法提升为管理员帐户。

Server 2008 R2 has UAC turned off by default. If it's turned off, then users from Administrators group have full admin rights and non-admin users do not have them and can't be elevated into an administrator account.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文