Visual Studio 2003 Setup and Deployment Project

Question about what I thought would be a simply process, namely to create a setup project for a small application I wrote in C#/.NET 1.1.  So I've created a setup and deployment project and added the "Primary output..." to the Application Folder as well as all the dependencies and merge modules needed by the application.  All that is fine and the application installs and works.

So the problem is that I'd like to have a shortcut to the main exe file from the desktop as well as the Start Menu.  I followed the instructions as best I can, since the instructions to exactly match reality...  The MSDN docs say:

To add a shortcut to a file or folder

In the File System Editor, select the file or folder to which you want to create a shortcut.
Note   When adding a shortcut to a special folder, you must set the AlwaysCreate property of the folder to true.
On the Action menu, click Create Shortcut to <Name>. The shortcut appears in the File List.
Select the shortcut, and choose Cut from the Edit menu.
In the Folder List, select the folder where you want the shortcut to appear on the target computer, and choose Paste from the Edit menu.
Tip   You can also drag shortcuts from one place to another.

Ok so first of all there is no "Create Shortcut to <Name>." option in the menu.  There is only one that says:

"Create Shortcut to Primary output from Name of my project (.NET Release)"

So if I do that it does create what says it is a shortcut and I can copy that to the Desktop and Programs Menu.  When I run the setup shortcuts DO get created but they don't run the application, they run the INSTALLER again and then run the application.

Can someone tell me what I'm doing wrong or how to create a shortcut properly?

Thanks.
LVL 32
jhanceAsked:
Who is Participating?
 
AlexFMConnect With a Mentor Commented:
Cannot reproduce this, my shortcut runs successfully in both cases - with Primary Output and with .exe file. But I have VS 2005. Maybe there is something else in your project that I don't know.
I have two suggestions:
1) Create new Setup project (empty), add one exe file to it and make shortcut. Does it happen again? Where does it happen - on the development computer or other computer?
2) Post link to this question in .NET area.
0
 
AlexFMCommented:
What happens if you run program from Windows Explorer after installation? Does it run installer before or directly the program?
What do you see in the shortcut properties after installation?

Creating shortcut in the Setip project is so easy that doesn't require any instructions. Like in Windows Explorer, you can right-click your program, select "Create Shortcut", them move it to any other place in the project (like Desktop), change it's name etc.
0
 
jhanceAuthor Commented:
I agree that this is something that should be simple.  What is an installer without a desktop or start menu shortcut?

If I navigate to the installation folder and run the .exe installed by the setup project, the application runs normally.  It's only if I run the shortcut that is runs the installer again.

As far as the properties, that's confusing also.  It is a shortcut but the "Target" not what I expect.  See:

http://img227.imageshack.us/img227/9990/cdprops1ug.jpg
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
AlexFMCommented:
Are you sure that you made shortcut to executable file and not to something else? What do you see in the shortcut properties in the setup project?
Try to make it again using the way from my first post - right-click on your executable, select "Create Shortcut" etc.
BTW, it is difficult to see details in your jpg image.
0
 
jhanceAuthor Commented:
Make your browser larger and you can see the image better.

When I right click on the Project output I get:

http://img93.imageshack.us/img93/3543/desktop39gt.jpg

Then I drag that to the User's Desktop folder.

Here are images of the VS desktop:

http://img150.imageshack.us/img150/7348/desktop19gv.jpg
http://img217.imageshack.us/img217/5623/desktop25jr.jpg
0
 
AlexFMCommented:
What is "Primary output from ClubDirectory"? This should be executable file, like MyProgram.exe.
0
 
AlexFMCommented:
Well, I see that Primary output is created by Project Wizard. I prefer to add files manually to the Application Folder: right-click, Add, File. Add all exe, Dll and other required files. Having files list you can create shortcut to executable.
0
 
jhanceAuthor Commented:
It makes no difference whether I add the Primary Output (which is added semi-automatically by VS) or if I add the .exe file (there is only one) specifically and create the link to it.  The installer runs again no matter what.

I'm baffled!!
0
 
jhanceAuthor Commented:
I'm using VS 2003 but this is pretty basic.  If such a fundamental flaw existed in VS 2003 surely someone else would have noticed...
0
 
jhanceAuthor Commented:
Very strange.  I deleted the setup project I was working with and started over from scratch.  All is well...

Go figure.  Thanks for listening.
0
 
CSDIICommented:
I am trying to create a shortcut also. However, my primary output contains two files. One is the "app.exe" the other is the "app.exe.config" file. I have no idea why the config file is being included. Should the "app.exe" file be the only one in the primary output?
0
 
CSDIICommented:
I just found out why the "app.exe.config" file is in the primary output. It includes keys to the server, database, and other data needed to work with the data for the app. The question now becomes: If I create a shortcut to the primary output, will it only point to the "app.exe" file? I would try it and see except it takes forever to build the deployment files.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.