Visual Studio .NET simplifies the process of installing your applications by providing an easy way to add the Setup Wizard to your applications. In this tip, Irina Medvinskaya will create a simple VB.NET Windows application and add the Setup Wizard to it in order to allow the Windows application to install.
Visual Studio .NET simplifies the process of installing your applications by providing an easy way to add a Setup Wizard to your applications. In this tip, I will create a simple VB.NET Windows application and add a Setup Wizard to it in order to allow the Windows application to install.
Add a Setup Wizard in .NET
First you need to create a new setup project in Visual Studio .NET. Follow these steps:
- Go to File | Add and click New Project.
- In the Add New Project dialog box, select Other Project Types and choose the Setup And Deployment Projects folder.
- In Templates For Windows-based Applications, pick Setup Project; for Web-based Applications, pick Web Setup Project.
If you decide to add an existing setup project to your solution, simply choose Existing Project in the File | Add menu and, in the Add Existing Project dialog box, select the project and click Open.
To create an example VB.NET Project, start a new project and add the following code to the Form Load event:
Add a Setup Wizard to your application
Follow these steps to add a Setup Wizard to your application:
- Go to File | Add Project | New Project to open the Project dialog box.
- Select Setup And Deployment Projects, click Setup Wizard, then follow the steps in the Setup Wizard as shown below.
Select Primary Output From WindowsApplication1 in the third step (see Figure C). Figure C
After the Setup Wizard is done, you will see the Setup information page (see Figure F). Figure F
Build the entire solution
Look for the Setup exe file in either the Debug or Release folder (depending on whether you are working in the Debug or Release mode) and double-click on it. You will see the Setup Wizard installation steps.Figure G
You should now see Setup2 in the list of folders under the Program Files. In the setup folder, you will see the executable to your application (see Figure K). Figure K
Double-click on the application to test if it has been installed properly (see Figure L). Figure L
You can confirm that the application is appearing in the list of programs by going to Control Panel | Add Or Remove Programs (see Figure N). Figure N
Irina Medvinskaya has been involved in technology since 1996. She has an MBA from Pace University and works as a project manager at Citigroup.
————————————————————————————————————————————Get Visual Basic tips in your inbox
Advance your scripting skills to the next level with TechRepublic's free Visual Basic newsletter, delivered each Friday. Automatically subscribe today!