Software Development

Adding a Setup Wizard to VB.NET applications

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:

  1. Go to File | Add and click New Project.
  2. In the Add New Project dialog box, select Other Project Types and choose the Setup And Deployment Projects folder.
  3. 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:

    MessageBox.Show("got it")

Add a Setup Wizard to your application

Follow these steps to add a Setup Wizard to your application:

  1. Go to File | Add Project | New Project to open the Project dialog box.
  2. Select Setup And Deployment Projects, click Setup Wizard, then follow the steps in the Setup Wizard as shown below.

Figure A

Figure A

Figure B

Figure B

Select Primary Output From WindowsApplication1 in the third step (see Figure C). Figure C

Figure C

Figure D

Figure D

Figure E

Figure E

After the Setup Wizard is done, you will see the Setup information page (see Figure F). 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

Figure G

Figure H

Figure H

Figure I

Figure I

Figure J

Figure J

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

Figure K

Double-click on the application to test if it has been installed properly (see Figure L). Figure L

Figure L

Figure M

Figure M

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

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!

18 comments
VbLearner2014
VbLearner2014

Hai.. Broooo.. I can't access the option of "Other Projects" in My VB (VB 2008 Express Edition)...


asmaqureshi82
asmaqureshi82

good artical thanks to share Add a Setup Wizard in .NET regards Asma Qureshi Software eng Dubai UAE

asmaqureshi82
asmaqureshi82

dear friend. good Articl :) easy to create setup for vb.net with this Artical Thanks for share a good artical regard Asma Qureshi Software Eng. Dubai UAE

louisgoossens
louisgoossens

What I have to do with my Express Edition of VB.NET? (no Setup Wizard!) Buy the full Edition?

bhabadharish
bhabadharish

This is very good article on setup and deployement .net

amrzein69
amrzein69

I did the same procedure but the problem is that i could not find the application in the start menu and i couldn't apply a shortcut in the desktop

caveatashish
caveatashish

Hi, For running a window application we should have .net framework installed on the system, can't we have a single setup which will installed .net framework first if it is not there and then will install the appliaction

lokeshkumarn
lokeshkumarn

i need full steps for deploying.can any one say to me

kanteti.srinivas
kanteti.srinivas

HI, This is srinivas, I knew iwant to add the PHOTO in the setup wizrd.Plz send the details this is my mail id:kanteti.srinivas@gmail.com

mafaisal25
mafaisal25

Ok But Using This Setup Sql configuration tool select that is installed, is any way to restore Backup file or mdf file automatically when we install set up Please reply

mikifin
mikifin

It would be nice if these articles where PDF for reading later. I don't often get to drop everything and play with "stuff" like this.

Yinchar
Yinchar

easy and straight forward i think new programmer should take a clue

Justin James
Justin James

I've been using this a bit over the last few years, and I really like it, to be honest. You can do a *lot* with it, but do not need to learn a lot to do the basics. J.Ja

Justin James
Justin James

The install wizards created by Visual Studio, by default, check for the right version of .Net and install it if needed. J.Ja

Justin James
Justin James

They still are, sometimes. It depends upon the article, sadly. The items posted under the "Articles" grouping have PDF versions, the items under "Blogs" do not. I agree wholeheartedly with you; there should either be a PDF, or a similarily printer & "Save to Disk" friendly option for people to use for useful content like this. My best (and only) suggestion is to bookmark the page and come back to it later. I will raise the PDF issue with the appropriate folks here. Thanks! J.Ja

Justin James
Justin James

It turns out that this is already in the works here! J.Ja