开发者

How do I Create a link to an executable Installed by Visual Studio Setup Project

I am working on a visual studio setup开发者_StackOverflow project. I want the setup project to install the executable for a windows forms project, and then put a link to that executable in the Programs Menu on the target machine. In the Setup Project I clicked 'Add'-> Project Output... and selected the Primary Output from my WindowsForms App. So that should install the program right? Ok, so next I went to the File System on the Target Machine, right clicked on the Primary output from WindowsForms App and said Create Shortcut. I then moved that shortcut into the User's Programs Menu folder.

I tried running the installer and it works ok but for some reason whenever I click shortcut that is in the Programs Menu It actually installs the program before running it every time. Why does it do this? Did I add a shortcut to the wrong thing? If I navigate to the directory application directory and click the .exe file it just opens the program without doing any install. Does anyone know what is going on?

I read somewhere that I could actually make a shortcut in windows explorer that targets my output .exe and then add that file to the installer project but I can't see how that would work on every machine it gets installed on.


I think this is how I did it... been a while tho.

  1. Application Folder
  2. Primary Output From MyProjectName (Active)
  3. Right-Click => Create Shortcut

Then

  1. Users Program Menu
  2. Right Click => Add Folder
  3. Go back to "Application Folder"
  4. Move the shortcut over to the program menu
  5. Rename it to whatever you need. The "Type" should say "shortcut"

Is that kinda what it looks like for you right now? Something in * User's Program Files * My App Folder * Start My Application (shortcut)

And need I say, MS's install projects are a nightmare :) Just open the .VDproj and look. I never thought i'd say I like the csproj xml format, but in comparison...


The problem was not actually in how I was creating my shortcut but rather what the shortcut was pointing too. The executable that the shortcut was targeting was not in the main installation folder and for some reason it didn't like that. Restructuring the install directories a bit fixed it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜