Solved

In C# with VS2008 Setup project, how to add my program to the Programs menu?

Posted on 2012-03-21
5
555 Views
Last Modified: 2012-03-22
Hi experts
I would like to create a short cut to my program so that user can execute the program by going to the Programs Menu.

I am using C# and VS2008.

Please refer to my attached screen shot:
I went into the "File System" under the Setup project.
I selected the "FAT" folder under the "User's Program Menu".
I right-click on "Create New Shortcut" in the Context Menu.
I got the screen as in the screen shot.
I want to select an executable but there is only "Primary output from FAT (Active)".

This "Primary output from FAT (Active)" consists of two files: FAT.exe (which I want) and app.config (which I also need but not to be displayed in the Programs Menu).

Could someone please tell me what I am missing? Thanks in advance.
Setup.JPG
0
Comment
Question by:dominicwong
  • 3
  • 2
5 Comments
 
LVL 40
ID: 37750841
For a Windows application, primary output is your executable. Create the shortcut on that and it should work.

When you have the shortcut selected, you can use the properties window to change a few things such as adding an icon and rephrasing the text (Name property), but leave the Target as Primary Output.
0
 

Author Comment

by:dominicwong
ID: 37750861
Hi James
Thanks for your prompt response.
When you said "Create the shortcut on the executable", did you mean I do it from the "Add File" button in the dialog box that I showed in the previous screen shot?
The only location for this executable will be in my development folder though. Had I misunderstood something? Kindly please enlighten.

Thanks.
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 37751730
Simply go OK in the "Select Item in Project" dialog in the screenshot. Although it is not explicitely stated, the shortcut to the Primary output is the shortcut to the executable.

The location is not saved at this step. You just told the installer to create a shortcut after the installation is complete. This shortcut cannot be created until that time, because the installer will give to the user the choice of the installation directory.
0
 

Author Comment

by:dominicwong
ID: 37755296
Thanks James. It works fine.

Somehow, when I chose the 'Primary output from FAT' yesterday,  it not only gave me the executable but also the "app.config" at the Programs Menu. I probably had selected "Add" rather than "Create New ShortCut".

Thanks again for your help and prompt responses.
0
 

Author Closing Comment

by:dominicwong
ID: 37755298
Thank you.
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

861 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