Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Visual Studio 2003 Setup and Deployment Project

Posted on 2006-06-21
12
Medium Priority
?
16,016 Views
Last Modified: 2013-12-04
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.
0
Comment
Question by:jhance
  • 5
  • 5
  • 2
12 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 16957389
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
 
LVL 32

Author Comment

by:jhance
ID: 16958161
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
 
LVL 48

Expert Comment

by:AlexFM
ID: 16958375
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 32

Author Comment

by:jhance
ID: 16958408
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
 
LVL 48

Expert Comment

by:AlexFM
ID: 16958525
What is "Primary output from ClubDirectory"? This should be executable file, like MyProgram.exe.
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 16958798
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
 
LVL 32

Author Comment

by:jhance
ID: 16959242
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
 
LVL 48

Accepted Solution

by:
AlexFM earned 1000 total points
ID: 16959403
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
 
LVL 32

Author Comment

by:jhance
ID: 16959691
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
 
LVL 32

Author Comment

by:jhance
ID: 16959995
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
 

Expert Comment

by:CSDII
ID: 22624639
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
 

Expert Comment

by:CSDII
ID: 22624749
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Screencast - Getting to Know the Pipeline

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question