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.
- 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.
- 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.
- 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.
- 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.
- 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.
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.
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