Visual Studio Deployment Project - Create shortcut to deployed executable

Visual StudioSetup Deployment

Visual Studio Problem Overview


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.

Visual Studio Solutions


Solution 1 - Visual Studio

After wasting an hour, I got it done - VS 2010 ... VS 2017 (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!

Solution 2 - Visual Studio

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

Solution 3 - Visual Studio

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.

Solution 4 - Visual Studio

I resolved this error by using a 64 x 64 icon

Solution 5 - Visual Studio

wondering if any of you have actually used visual studio? when you add a primary output and right click it, theres no option to add a shortcut. if you create a shortcut, you cant select primary output as an option. the option simply is not there

Solution 6 - Visual Studio

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionFred StraussView Question on Stackoverflow
Solution 1 - Visual Studioroman mView Answer on Stackoverflow
Solution 2 - Visual StudioJeff RoeView Answer on Stackoverflow
Solution 3 - Visual StudioStefan EgliView Answer on Stackoverflow
Solution 4 - Visual StudioAlexander LibersonView Answer on Stackoverflow
Solution 5 - Visual StudioPetNoireView Answer on Stackoverflow
Solution 6 - Visual StudioKemal DuranView Answer on Stackoverflow