Computer Programming web Web programming Tips



How to use Package and Deployment Wizard for deployment of VB application

By Sergey Skudaev

In previous tutorial VB Password Keeper Application you learn how to create VB application. You can run this application only if Visual Basic is installed on your PC. What if you want to give this application to your friend as a Christmas present? You friend will not buy Visual Studio for couple of thousand bucks to run your free application. So, you have to create an installation package that allows your friend or customer to install and run your VB application on his or her PC. Fortunately, Visual Studio has the Package and Deployment Wizard, which helps you with that task. In this tutorial you will learn how to use Package and Deployment Wizard for deployment of Visual Basic application.

Open Visual Studio and select Microsoft Visual Studio Tools, Package and Deployment Wizard. Hover mouse over a thumbnail to view an image.

Package and Deployment Wizard

Picture 1. Visual Studio and select Microsoft Visual Studio Tools, Package and Deployment Wizard

Package and Deployment Wizard is displayed.

VB Deployment Wizard

Click Browse button and find your project.

Visual Basic Package and Deployment Wizard

Click Open button. The project path is displayed in Package and Deployment Wizard window. Click Package button in the left upper area. System prompts you to compile the application. Click Compile button See screen shot below

Visual Basic Deployment Application

System creates executable file for your application. The Package and deployment Wizard - Package Type window is displayed. Select Standard Setup package.

Visual Basic Package and Deployment

The Package and deployment Wizard - Package Folder window is displayed.

Visual Basic Package and Deployment

Select where you want to place package folder on your PC hard drive. Click Next button. System prompts you to create Package folder. Click Yes if you did not create it manually before.

Deployment VB application

The Package and deployment Wizard - Included files window is displayed. Since your application uses MS Access mdb file you have to add the file to the package.

Visual Basic tutorial - deployment



Click the Add button and find MS Access file with the database for your application.

Deployment VB project

Click Open button. Then click Next button.

The Package and deployment Wizard - Cab Options window is displayed

Deployment Visual Basic Executable

Select if you need a single cab or multiple cabs. In your case you need a single if you are going to distribute your application on a CD or select Multiple, if you want to distribute your application on floppy disk. I selected singe cab. Click Next button.

The Package and deployment Wizard-Installation title Window is displayed. While working on coding you may name your file like "vb_keeper.vbp" but for sale you may invent something more attractive. I did not. I left it as PasswordKeeper.

VB Deployment Wizard

Click the Next button

The Package and deployment Wizard -Start menu Item window is displayed

Deployment VB project menu

Select where on Windows menu your application menu item will be displayed. In our case leave it as it is. Click Next button.

The Package and deployment Wizard-Installation Location window is displayed. Click scroll bar arrow at the right bottom corner and go to the path end.

VB Installation location

On the right side you will see installation location drop down list for each file.

$(AppPath)

Leave $(AppPath). Click Next button.

The Package and Deployment Wizard-Shared Files window is displayed

You do not have to share any files with the other application, so leave it as it is and click Next button

Package and Deployment Wizard-Shared Files

The Package and deployment Wizard-Finished! window is displayed. Enter script name and click Finish button

Package and deployment Wizard-Finished

The package Report is displayed

Package and Deployment Report

Click Save Report button for future reference. Close the Package and Deployment Wizard window. We are done.

Close the Package and Deployment Wizard

To see what was created by the Package and Deployment Wizard go to VB project.

Package folder created

You see the executable file PasswordKeeper.exe and the Package folder were created. Open the Package folder.

SETUP.LST file and Support folder

You see the PasswordKeeper.CAB file, setup.exe file, SETUP.LST file and Support folder . Open the support folder and you will see DLL s, your MS Access database, and some other files that will be needed to run visual basic application.

installation package

Let us test our installation package. Go back to Package folder and double click setup.exe file. The Installation process begins

The Installation process begins

Click OK button.

deployment installation setup

Click Icon with PC to start installation

VB application installation

Select program group. Click Continue button. The Password Keeper Application will be inatalled.

Deployment of VB project

Click OK button. On your PC go to start, All Program, and find Password Keeper menu item. Login screen is displays. Play with your application and check if it is installed correctly and you can save data and pull data from db.

Installation of VB Application

Now we are really done.

My eBooks on Amazon.com



Subscribe to our mail list to receive free code examples.

Comments (1)

Topic: How to use Package and Deployment Wizard for deployment of VB application
Sort
4/5 (1)
Facebookdel.icio.usStumbleUponDiggGoogle+Twitter
Gravatar
Full StarFull StarFull StarFull StarEmpty Star
Raymund
Hi sir., it went well, but after the installation, my ms access database became read-only and I'm not able to add details on database.. as it says it is read-only...pls help... thanks
17th September 2016 10:26pm
Page 1 of 1

Add Comment

* Required information
(never displayed)
 
Smile Sad Huh Laugh Mad Tongue Crying Grin Wink Scared Cool Sleep Blush Unsure Shocked
 
1000
Out of 56, 14 or 27, which is the smallest?
 
Enter answer:
Captcha
Refresh
 
Enter code:
 
Notify me of new comments via email.
 
Remember my form inputs on this computer.
 
I have read and understand the privacy policy. *
 
I have read and agree to the terms and conditions. *
 
 
Powered by Commentics