In this example i am going to explain how to create setup and deployment project for winforms windows application using visual studio 2005/2008/2010.
Similar approach can be applied for creating setup project for web application as well.
First of all create any sample windows/web application.
Create setup project
right click on solution explorer root and select Add > New project
In add new project dialog box select setup and deployment from other project types and then select Setup Project.
In the setup project file system editor window, right click on Application folder > Add > Project Output
Now select primary output from next dialog box and click on OK.
Right click on User's desktop and create shortcut to primary output in application folder.
Similarly add shortcut in user's program menu.
Build the project by right clicking on setup project name and run the setup.
Hope this helps
Download the sample code attached