Home > DeveloperSection > Articles > How to create a setup project for windows application

How to create a setup project for windows application

Posted by  Awadhendra Tiwari
on    January-27-2011 14:46 PM

Setup Setup 
Ratings:
0 Comment(s)
 6804  View(s)
Rate this:

How to create a setup project for windows application

When we create any windows based application then we need to deploy it on target machine. For deploying windows based application on target machine we have so many option such as xcopy command utility provided by MSDOS or click once method. In same way we have one more method for deploying application on target application is Creating Windows Installer which is provided by Microsoft Visual Studio IDE. In this session I will tell u that how to create a setup for window based application.

Steps for Creating Windows Installer

Ø  Open your windows projects in a solution project for which you want to create installer.

Ø  Click File menu option in VS IDE.

Ø  Followed by click AddàNew Project sub menu in VS IDE.

Ø  By performing these steps Add New Project dialog box appears which is as follows.

How to create a setup project for windows application

Ø  From project types click other project types and then click Setup and Deployment and then choose Visual Studio Installer.

Ø  From project templates select Setup Wizard.

Ø  Provide name of your project.

Ø  Choose location of your setup project where you want to store it.

Ø  Then click ok button and follow the wizards that will appear.

Ø  After clicking Ok button Setup wizard  open which looks like as follows.

How to create a setup project for windows application

Ø  Click Next Button and choose the project type that you want to create. For this example I had chosen create a setup for a window application. How to create a setup project for windows application

Ø  Click next button and choose project outputs to be included. For this example I had chosen two options Primary Output and Content Files from Tree View Control Demo. How to create a setup project for windows application

Ø  Click next button and add any additional files that you want for your project. For this demonstration did not add any additional files.

Ø  Click next button which shows summary of your projects and then click finish button.

How to create a setup project for windows application

Ø  After clicking finish button a new window named File System on target machine is open. This is known as registry editor. Visual studio setup installer provides 6 editors which have a different task. According to the requirements choose editors.

How to create a setup project for windows application

Creating Shortcuts on User Document

Ø  Click on View menu followed by Editors sub menu then click File System editor. By performing these steps file system editor is open.

Ø  From right pane of File system editor select Primary Output from tree view control.

Ø  Then click Action menu and click Create Shortcut to primary output from Tree view control.

Ø  Then finally drag the shortcut that recently you had created and drop there where you want to create shortcut such as User’s Desktop or User’s.

Modifying User Interface of Setup

Ø  Click on View menu followed by Editor Sub menu and then select User Interface Editor. A user interface editor is opened.

How to create a setup project for windows application

In this diagram you had seen two section one Install section and another one is Administrative Install section. If you want to disable certain options from user and provide some extra privilege to Administrators then disable those options from Install section and provide additional option to Administrative install section.

Adding License Dialog Box

For adding License dialog box follow these steps.

Ø  Right click on the start section and then click Add dialog. After performing these steps Add Dialog box opens which contains several dialog boxes such as License Agreement or Register User Dialog box. Select License Agreement dialog box and click Ok button to add dialog box.

Ø  Select License Agreement dialog box and move it up where you want that it appears or not.

Ø  Right click on the License Agreement Dialog box and then go to the properties window.

Ø  From properties window click License File option and browse the license file that you have created. Make sure that license file that you have created have .rtf extension. When you click browse then Add new Item dialog box opens. Click Application Folder option then click Add button and select license file.

Adding Register User Information

For adding Register User dialog box follow these steps.

Ø  Right click on End section and click Add dialog. After performing these steps Add dialog box opens from which select Register User Dialog box and then click Ok.

Ø  Right click on Register User dialog box and then go to properties windows

Ø  From properties window click Executable option and then choose exe of Register User form that you have created as a separate project.

Building your application

Open solution explorer and then right click on your setup project and then click Build option and build your application. After building your application the setup of your project is created and you can install it.

Output of setup

How to create a setup project for windows application How to create a setup project for windows application

How to create a setup project for windows application How to create a setup project for windows application

How to create a setup project for windows application How to create a setup project for windows application

How to create a setup project for windows application How to create a setup project for windows application
















Recent Activities

jayprakash sharma Created New Discussion what is short circuit operator in java   18 hours ago

Sumit Kesarwani added new Question What is the Vector class in java?   3 days ago

Anchal Kesharwani added new Blog JSON Syntax   9 days ago

Anchal Kesharwani added new Article How to Send Mail in Node.JS   9 days ago

Top Contributors

Don't want to miss updates? Please click the below button!