[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

C# automatically creating a desktop icon during install?

Posted on 2007-10-09
12
Medium Priority
?
4,920 Views
Last Modified: 2010-08-05
When I distribute my C# app with the build from visual studio it creates a nice start > programs entry but no desktop icon. Of course I can manually make one but for the less knowledgeable I would prefer if it sould automatically do this. Any thoughts?

Thanks,
Karl66
0
Comment
Question by:Karl66
  • 6
  • 4
  • 2
12 Comments
 
LVL 4

Expert Comment

by:jimstar
ID: 20040951
From your VS Setup and Deployment project, right click on it, then click View -> File System. Click on User's Desktop. Then, right click on the empty area to the right of your screen and select "Create New Shortcut". This will let you add a shortcut to the application on their desktop.
0
 
LVL 4

Expert Comment

by:jimstar
ID: 20040959
If you have any trouble finding it, just let me know!
0
 
LVL 2

Expert Comment

by:andrepires
ID: 20041017
Hi!
In your setup project, look at the left side. There is a treeview called File System on Target Machine.
Click on User's Desktop.
Once User's Desktop is selected, on the right side, right click the white space and choose Create New Shortcut on the popup menu.
It is going to open a dialog.
Double click on User's Desktop.
You will see that it enables the buttons on the right side of the dialog.
Click on Add Output.
Choose your application's primary output
Click the Ok button
Now you will see that the properties window allows you to choose the Icon for the shortcut.

Hope this helps.

0
Independent Software Vendors: 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!

 

Author Comment

by:Karl66
ID: 20042733
I am not seeing the setup project you derscribe here.

"In your setup project, look at the left side. There is a treeview called File System on Target Machine.
Click on User's Desktop."

How do I get to it?
0
 

Author Comment

by:Karl66
ID: 20042750
Under Build > Publish picture viewer I dont see any options either.

Thanks!
0
 
LVL 2

Expert Comment

by:andrepires
ID: 20042768
I seams like you are not using a VS setup project...
If so, how are you distributing your application?
Are you using any 3rd setup tool?
If you were using the VS setup project you would be able to do what we suggested.
0
 
LVL 2

Expert Comment

by:andrepires
ID: 20042819
Ok you are using the Publish wizard.
I recommend you to add a Setup and Deployment project to your current solution.
It gives you more flexibility when creating your setup program.
0
 

Author Comment

by:Karl66
ID: 20043131
How do I do that (and I am using the express version of C# VS)
0
 
LVL 2

Expert Comment

by:andrepires
ID: 20043900
Hi.
You cannot create setup and deployment projects with c# express.
Also, the click once Publish wizard that you are using, doesn't allow you to create the desktop icon.
An workaround is coding your app with the necessary file access permissions so the app will create the desktop shortcut once it runs for the first time.
If you want to use such approach, please take a look at this link:
http://www.codeproject.com/dotnet/shelllink.asp
Now that I know what tools you are using, I recommend you to use a 3rd party setup tool to create a nice installation program fro your application.
You should try Inno Setup. http://www.jrsoftware.org/
It is free and is very powerful tool.

Regards,

Andre
0
 
LVL 2

Expert Comment

by:andrepires
ID: 20043930
Remember that if you use that workaround, the desktop icon will not be removed when you uninstall the application, so using the free setup tool is the best option.
0
 

Author Comment

by:Karl66
ID: 20044037
Cool and it works with C#?!
0
 
LVL 2

Accepted Solution

by:
andrepires earned 750 total points
ID: 20044190
Sure.
It works with all IDE's.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you don't know how to downgrade, my instructions below should be helpful.
Integration Management Part 2
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

873 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