由 VS 2008 创建的 msi 创建时,桌面快捷方式图标上缺少 UAC 屏蔽覆盖
我创建了一个安装程序来使用 Visual Studio 2008 部署 VBNet 程序。在这个安装程序中,我创建了一个指向要安装在用户桌面上的“主输出”的快捷方式。
现在,一切正常。该程序安装在“C:\Program Files”下,并在桌面上创建快捷方式。另外,当我使用此快捷方式时,UAC 会提示我自动以管理员身份运行此程序。到目前为止,一切都很好……
但是!即使程序是使用声明其必须以管理员身份运行的清单进行编译的,我的桌面图标也没有 UAC 屏蔽覆盖层。另外,如果我在安装后在桌面上手动创建同一可执行文件的新快捷方式,则该新快捷方式将具有屏蔽覆盖!
我尝试重新启动并删除 iconCache.db 文件,但没有成功。
所以我的问题是:在最初安装时,如何让我的桌面快捷方式与 UAC 屏蔽覆盖一起出现。
谢谢!
I created a setup program to deploy my VBNet program using Visual Studio 2008. Inside this setup program I created a shortcut to the "primary output" to be installed on the user desktop.
Now, everything is working correctly. The program is installed under "C:\Program Files" and the shortcut is created on the desktop. Also, when I use this shortcut I am prompted by UAC to autorize running this program as administrator. So far, so good...
But! My desktop icon does not have the UAC shield overlay even if the program is compiled with the manifest stating that it must run as administrator. Also, if I manually create a new shortcut on the desktop to the same executable after the installation, this new shortcut WILL have the shield overlay!
I have tried to reboot and delete the iconCache.db file but it did not work.
So my question is: How can I have my desktop shortcut appear WITH the UAC shield overlay when installed initially.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以通过使用
Orca
或由 Visual Studio 使用后期构建自动更改msi
文件中的一个表格行来使您的快捷方式非广告
事件。转到项目的属性,然后输入以下
PostBuildEvent
:WiRunSql.vbs 文件可从 微软
问候
鲁莫
You can make your shortcuts
non-advertised
by changing one table row in themsi
file either usingOrca
or automatically by visual studio using a post build event.Go to the Project's Properties, and enter the following
PostBuildEvent
:The WiRunSql.vbs file is available from microsoft
Regards
Lumo
没有更多细节,我唯一的猜测是您在目标存在之前创建了快捷方式,以便 Windows 无法看到清单。
Without any more details, my only guess is that you create the shortcut before the target exists so that windows is unable to see the manifest.
我建议安装程序创建的图标不要指向 .exe 文件,而是指向注册表项。打开快捷方式属性,如果快捷方式选项卡上的目标字段被禁用并且包含应用程序的名称,那么就是这种情况。
您可以将图标设为非广告,然后创建的快捷方式将指向 .exe 文件。但在这种情况下,如果 .exe 丢失,安装将无法自动修复。
I would suggest that the icon created by the installer does not point to the .exe file but rather to a registry key. Open shortcut properties, if Target field on Shortcut tab is disabled and contains the name of the application, then it is the case.
You can make your icon non-advertised, then the created shortcut would point to .exe file. However in this case, the installation can't be automatically repaired if .exe becomes missing.