UAC在“requestedExecutionLevel”上用“asInvoker”提示启动程序 [英] UAC prompting on startup program with “asInvoker” on the “requestedExecutionLevel”

查看:1305
本文介绍了UAC在“requestedExecutionLevel”上用“asInvoker”提示启动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个非常简单的C#Windows应用程序(它只显示一个消息框,上面写着UACtest)我希望它在启动时运行而不会提示UAC。



为此,我在HKCU下为它创建了一个注册表项,在我编译它的机器上(使用Visual Studio 2013的Windows 8 64位),它在启动时运行而不会像预期的那样提示UAC。



但是,如果我将可执行文件导出到Windows 7计算机并执行完全相同的操作,则会在启动时显示UAC提示符。



请注意,可执行文件的清单在requestedExecutionLevel上有asInvoker。



当我直接双击可执行文件时,它从不提示UAC在Windows 7 32位或Windows 8 64位上,UAC提示问题仅在启动时。



我也尝试编译可执行文件Windows 7 32位机器(可能绕过一些兼容性问题)和一个奇怪的事情哈ppened,在该机器中,现在UAC在启动时没有按预期提示,但是,当我在另一台机器上进行测试时(Virtual Box下的Windows 7 64位),它在启动时提示UAC。



现在这让我很困惑,有人可以告诉我一种编译它的方法,以便它在所有版本的Windows上都不会在启动时提示UAC吗?



我在Visual Studio 2013上使用的项目属性是默认的,除了:*目标框架:2.0 *平台目标:x86



和UAC设置在所有默认设备上的机器上:仅当应用程序尝试在我的计算机上进行更改时通知我(默认)



此外,可执行文件的名称不包含像安装或更新这样的词语不会触发UAC安装程序启发式。

I am developing a very simple C# Windows Application (it only displays a message box saying "UACtest") that I want it to run at startup without prompting UAC.

For that I created a registry key for it under HKCU, and in the machine that I compiled it (Windows 8 64-bit using Visual Studio 2013) it runs at startup without promping UAC, as expected.

However, if I export the executable to a Windows 7 machine and do exactly the same thing, a UAC prompt is shown at startup.

Please note that the manifest of the executable has "asInvoker" on the "requestedExecutionLevel".

Also when I directly double click the executable, it never prompts UAC neither on Windows 7 32-bit or in the Windows 8 64-bit, the UAC prompting problem is only at startup.

I also tried to compile the executable on the Windows 7 32-bit machine (to maybe bypass some compatibility issues) and a strange thing happened, in that machine now UAC is not prompted at startup as expected, however, when I make the test on another machine (Windows 7 64-bit under Virtual Box) it prompted UAC at startup.

This has now really puzzled me, can someone please tell me a way to compile it so that it never prompts UAC at startup on all versions of Windows?

The project properties I used on Visual Studio 2013 are the default ones, except: *Target framework: 2.0 *Platform target: x86

And the UAC settings on all machines where the default one: "Notify me only when applications try to make changes on my computer (default)"

Also the name of the executable does not contain words like "install" or "update" to not trigger UAC installer heuristics.

推荐答案

这篇关于UAC在“requestedExecutionLevel”上用“asInvoker”提示启动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆