Windows UAC 对话框 [英] Windows UAC Dialog

查看:34
本文介绍了Windows UAC 对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个没有资源的应用程序(根本没有,所以也没有 UAC 清单).此应用程序使用 CopyFile 将自身安装到 appdata/roaming 文件夹中.它还设置了自动启动,因此每次启动时都会自动启动.现在,每次启动电脑时,都会弹出 UAC 对话框并说应用程序确实对电脑进行了更改.如果它位于 appdata 中,它的图标上也会有盾牌标志.如何删除图标中的对话框/盾牌?Windows 是否检测到 copyfile API 并自动设置它?

I have an application that has no resources (at all, so no UAC manifest either). This application installs itself to the appdata/roaming folder with CopyFile. It also sets an autostart so it starts automatically with every start. Now with every start of the pc, the UAC Dialog pops up and says that the application does changes to the pc. It also has the shield sign on the icon if it's located in appdata. How can I remove the dialog / the shield in the icon? Does Windows detect the copyfile API and sets it automatically?

感谢您的回答.

推荐答案

避免它的最好方法是添加应用程序清单:它明确地向系统传达这不是遗留应用程序并且不应应用安装检测逻辑(可能存在误报).

The best way to avoid it is to add the application manifest: it explicitly conveys to the system that this is not a legacy application and no install-detection logic (which could have false positives) should be applied.

此外,您的应用程序应该有一个包含文件版本和描述的 VersionInfo 资源.

如果您的应用程序没有清单,系统会使用启发式方法来检测它是否是安装程序.如果它认为该应用程序是安装程序,那么运行您的应用程序将需要提升,并且该应用程序的图标和可执行文件将被屏蔽.

If your application does not have the manifest, the system uses heuristics to detect if it's installer. If it thinks the application is installer, then running your application will require elevation, and the app will have shield on its icon and executable file.

摘自安装程序检测技术:

  • 文件名包含诸如安装"、设置"或更新"之类的关键字.
  • 版本控制资源字段包含以下关键字:供应商、公司名称、产品名称、文件描述、原始文件名、内部名称和导出名称.

这篇关于Windows UAC 对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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