VS 2008 created shortcut doesn't show up in "Send To" menu
I have a WinForms application built using Visual Studio 2008. I added a Setup Project to the solution to create a开发者_StackOverflow中文版n 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.
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.
精彩评论