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.
Picture 1. Visual Studio and select Microsoft Visual Studio Tools, Package and Deployment Wizard
Package and Deployment Wizard is displayed.
Click Browse button and find your project.
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
System creates executable file for your application. The Package and deployment Wizard - Package Type window is displayed. Select Standard Setup package.
The Package and deployment Wizard - Package Folder window is displayed.
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.
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.
Click the Add button and find MS Access file with the database for your application.
Click Open button. Then click Next button.
The Package and deployment Wizard - Cab Options window is displayed
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.
Click the Next button
The Package and deployment Wizard -Start menu Item window is displayed
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.
On the right side you will see installation location drop down list for each file.
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
The Package and deployment Wizard-Finished! window is displayed. Enter script name and click Finish button
The package Report is displayed
Click Save Report button for future reference. Close the Package and Deployment Wizard window. We are done.
To see what was created by the Package and Deployment Wizard go to VB project.
You see the executable file PasswordKeeper.exe and the Package folder were created. Open the Package 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.
Let us test our installation package. Go back to Package folder and double click setup.exe file. The Installation process begins
Click OK button.
Click Icon with PC to start installation
Select program group. Click Continue button. The Password Keeper Application will be inatalled.
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.
Now we are really done.