Visual Studio Deployment Project - Create shortcut

2019-01-21 10:20发布

I realize there is likely a simple method to do this but how does one create a desktop shortcut to the executable deployed by an MSI built using a Visual Studio Deployment project?

I imagine I need to use the Filesystem editor but when I create shortcut on the user's desktop I can't target the executable. I can only specify the target as the application folder not the specific executable.

5条回答
爷、活的狠高调
2楼-- · 2019-01-21 10:49

After wasting an hour, I got it done - VS 2010 (this article helped):

  1. In your Deployment Project go to File System Editor
  2. Click on "Application Folder" (I assume you have "Primary Output" from your projects there)
  3. Right click on "Primary Output" of the project you want to target with your shortcut - select "Create Shortcut to Primary Output ..."
  4. Rename shortcut
  5. Drag shortcut to Desktop / Programs Menu folder

That's it!

查看更多
地球回转人心会变
3楼-- · 2019-01-21 10:49

Should be quite simple:

  • Open FileSystem editor and go the User's Desktop folder.
  • Right click with the mouse and select Create New Shortcut.
  • You will be presented with a dialog that allows you to select for instance the application folder (on the target machine). When you double click on this you see what is inside that folder.
  • Now simply select the primary project output that "contains" your exe file.

Likewise you can set the icon of the shortcut. At least I believe so.

查看更多
孤傲高冷的网名
4楼-- · 2019-01-21 10:54

I resolved this error by using a 64 x 64 icon

查看更多
SAY GOODBYE
5楼-- · 2019-01-21 11:02

I would add the following steps (to roman m's answer) to get the .exe's icon into the shortcut, because it seems that by default you will get an ugly generic document-shortcut icon.

Assuming you have already given your program the desired icon,

  • right-click on the Deployment Project
  • pick menu item View > File System
  • in the File System window, find the shortuct whose icon you want to change (for example, under "Users's Programs Menu")
  • go to the shortcut's Properties (right-click and pick "Properties Window")
  • go to Icon
  • Browse...
  • change "Files of type" to *.exe
  • browse to and select your "primary output"
  • OK, OK
查看更多
太酷不给撩
6楼-- · 2019-01-21 11:04

icon file size is important, 75 KB is not showed in shortcut exe file, but 15 KB is showed.

查看更多
登录 后发表回答