In this article we will learn how to create a User's Desktop Shortcut and User's Program Menu by using VS setup and Deployment Project.
Introduction
In this article we will learn how to create a User's Desktop shortcut and User's Program Menu by using VS setup and Deployment Project.
Straight to Experiment
First of all create a blank solution and add a Windows form project.
Next add a "Setup and Deployment" project.
Right Click on the "Setup Project" - >Add - > Project Output
and add "WindowsFormsApplication1" as "Primary Output"
Right Click on the "Setup Project" - >View - > File system
The environment will look as under
Click Application Folder. Then on the right tab the "Primary output from WindowsFormsApplication1 (Active)" appears.
Right click it and select "Create Shortcut to Primary output from WindowsFormsApplication1 (Active)".
The shortcut appear below the primary output which is the application executable
Right click on the "Shortcut" and Rename it to "MyWindowsFormsApplication".
If we want to change the icon, the from the properties windows choose the icon and select a proper one.
Drag & Drop that shortcut from right tab to left tabs File System on Target Machine - User's Desktop folder.
For the User's Program Menu, right click and create a folder by the name "MyMenu"
Again create a short cut from the "Application folder" and this time drag it to "MyMenu"
That it.Build the application and install it.
Go to the desktop and we will find the "shortcut".
Double click it and the application will open up.
Next go to user Program menu and there we will find a folder "MyMenu" under which is the application
Double click and the application opens up
Conclusion
In this article we will learn how to create a User's Desktop shortcut and User's Program Menu by using VS setup and Deployment Project.Hope this will be helpful.Thanks for reading. Zipped file is attached