如何在每次启动应用程序时摆脱 UAC
How do I get rid of the UAC everytime I start my application
我已经使用威瑞信签署了我的应用程序,将所有注册表变量存储在 HKCU 中,以便不请求管理员权限,但 UAC 命令仍然提示用户他/她是否希望以下内容对他/她的计算机进行更改。我如何防止这种情况发生。
下面显示了 VS 生成的清单文件
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*' />
</dependentAssembly>
</dependency>
</assembly>
正如我所怀疑的那样,这种行为的解释可以在应用程序清单中找到。您已指定请求的执行级别 requireAdministrator
。正是该设置导致显示 UAC 对话框。将其更改为asInvoker
以避免请求提升。
....
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
....
Visual Studio IDE中可能有一个设置来控制这一点。我不熟悉这一点,但我希望这就是实现这种变化所需的方式。好的,我查了一下。IDE 设置位于配置页的"链接器"节点的"清单文件"部分下。可以在此处找到相关文档:http://msdn.microsoft.com/en-us/library/bb384691.aspx
在 MSDN 上阅读有关应用程序清单的信息。
相关文章:
- 试图在visual studio上用C++创建一个桌面应用程序
- FFmpeg:制作一个应用程序比直接使用ffmepg更好吗
- 在C应用程序中运行C++(带有STL)函数
- 使用VerQueryValue检索应用程序的文件描述
- Qt C++静态thread_local QNetworkAccessManager是线程应用程序的好选择吗
- 使用调试/崩溃报告将应用程序部署到客户端
- C++控制台应用程序阻止退出
- 码头化的C++应用程序是否向后兼容早期的内核版本
- 将应用程序从32位移植到64位时出现问题
- 如何改变c++应用程序的视觉效果
- WM_CTLCOLORSTATIC从未在WIN32应用程序中触发
- PC中的程序和PHONE中的本机描述应用程序之间的数据连接
- 应用程序崩溃并显示"symbol _ZdlPvm, version Qt_5 not defined in file libQt5Core.so.5 with link time reference"
- 示例外壳应用程序显示的 V8 "segmentation fault (core dumped)"错误
- phytec phyBOARD iMX-6在从闪存而不是SD卡运行qt5 opengles应用程序时表现不佳(FPS减半
- 为什么导入Mixed native/CLR lib.dll的本机C++应用程序没有在Mixed lib.dll中的外部变
- 如何从Windows应用程序输出到标准?
- C++应用程序 MySQL odbc 数据库连接错误:在引发"otl_tmpl_exception<>"实例后终止调用
- 如何在每次启动应用程序时摆脱 UAC
- 在不提示UAC权限的情况下从c++应用程序运行NSIS安装程序