Karl66
asked on
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
Thanks,
Karl66
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.
If you have any trouble finding it, just let me know!
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.
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.
ASKER
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?
"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?
ASKER
Under Build > Publish picture viewer I dont see any options either.
Thanks!
Thanks!
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.
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.
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.
I recommend you to add a Setup and Deployment project to your current solution.
It gives you more flexibility when creating your setup program.
ASKER
How do I do that (and I am using the express version of C# VS)
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
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
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.
ASKER
Cool and it works with C#?!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.