• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4931
  • Last Modified:

C# automatically creating a desktop icon during install?

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
Karl66
Asked:
Karl66
  • 6
  • 4
  • 2
1 Solution
 
jimstarCommented:
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
 
jimstarCommented:
If you have any trouble finding it, just let me know!
0
 
andrepiresCommented:
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
Karl66Author Commented:
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
 
Karl66Author Commented:
Under Build > Publish picture viewer I dont see any options either.

Thanks!
0
 
andrepiresCommented:
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
 
andrepiresCommented:
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
 
Karl66Author Commented:
How do I do that (and I am using the express version of C# VS)
0
 
andrepiresCommented:
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
 
andrepiresCommented:
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
 
Karl66Author Commented:
Cool and it works with C#?!
0
 
andrepiresCommented:
Sure.
It works with all IDE's.
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.

Join & Write a Comment

Featured Post

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.

  • 6
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now