VS 2008 创建的快捷方式未显示在“发送到”中菜单

发布于 2024-09-05 07:35:50 字数 485 浏览 2 评论 0原文

我有一个使用 Visual Studio 2008 构建的 WinForms 应用程序。我向解决方案添加了一个安装项目以创建安装 MSI 文件。我需要安装项目来创建一个指向用户“发送到”菜单中的应用程序可执行文件的快捷方式。这样,当有人右键单击某个文件时,我的应用程序将显示在“发送到”列表中并被选中。

我在安装项目的文件系统设置下弄清楚了如何添加用户发送到菜单的快捷方式。问题是,当您右键单击文件时,快捷方式不会显示在“发送到”菜单中。如果我手动创建可执行文件的快捷方式,该应用程序确实会显示在“发送到”菜单中。

我在网上阅读了许多有关此功能所需的注册表项的建议。 Ramesh Srinivasan 编写了一个 VBS 文件来插入它们。在每个系统上,我都在已经存在的注册表值上尝试过此操作,所以这不是问题所在。似乎更多的是与 Visual Studio(或无论如何 msi)正在创建的快捷方式有关。

我在 Windows XP 和 Windows 7 上遇到过同样的问题,我还没有在其他操作系统上尝试过。

I have a WinForms application built using Visual Studio 2008. I added a Setup Project to the solution to create an installation MSI file. I need the setup project to create a shortcut pointing to the application's executable in the users Send To Menu. This way when someone right clicks on a file, my application will show in the Send To list and be selected.

I figured out under the file system settings of the Setup project how to add a shortcut to the Users Send To Menu. The problem is, the shortcut doesn't show in the Send To menu when you right click on a file. If I manually create a shortcut to my executable the application does show in the Send To menu.

I have read many suggestions on the web to required registry entries for this to work. There is a VBS file written by Ramesh Srinivasan which inserts them. On every system I have tried this on the registry values already existed, so this is not the problem. It seems more to be with the shortcut Visual Studio (or the msi anyway) is creating.

I have experienced this same issue on Windows XP and Windows 7, I haven't tried it on other OS's yet.

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

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

发布评论

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

评论(1

糖粟与秋泊 2024-09-12 07:35:50

“发送到”菜单要求快捷方式是指向可执行文件的常规快捷方式。 Visual Studio 在构建 MSI 时创建的快捷方式是广告快捷方式。公布的快捷方式并不指向已安装的可执行文件,而是指向 MSI 安装程序,从而实现按需安装。

您必须设置DISABLEADVTSHORTCUTS MSI 上的属性以便拥有常规快捷方式。不幸的是,您必须在安装程序上使用构建后事件来设置 DISABLEADVTSHORTCUTS 属性 - Visual Studio 不提供简单的设置方法。

请参阅 Damien Vogel 这篇文章的答案,详细介绍了如何设置构建后事件。

The Send To menu requires that the shortcut be a regular shortcut pointing to a executable. The shortcuts created by Visual Studio when building an MSI are advertised shortcuts. Advertised shortcuts do not point to the installed executable, but to the MSI installer, enabling installation-on-demand.

You will have to set the DISABLEADVTSHORTCUTS property on the MSI in order to have regular shortcuts. Unfortunately, you will have to use a post build event on the installer to set the DISABLEADVTSHORTCUTS property - Visual Studio does not supply a simple way to set it.

See the answer by Damien Vogel to this post detailing how to set the post build event.

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