How to build an installer by using Visual Basic .NET or Visual Basic 2005 (821766)
The information in this article applies to:
- Microsoft Visual Basic 2005
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
- Microsoft Windows Installer 2.0
SUMMARYThis step-by-step article describes how to create an installer for a Microsoft Visual Basic .NET or Microsoft Visual Basic 2005 Windows application . In this
article, you create a solution that contains a simple Windows
application that starts Windows Calculator. You then add
a Setup Project to the solution to install the Windows application. Finally, you run the installer, and then install the Windows
application. back to the
topRequirementsThe following list outlines the recommended hardware, software,
network infrastructure, and service packs that you need:
- Microsoft Windows 2000 Professional, Microsoft Windows
2000 Server, Microsoft Windows XP Professional, or Microsoft Windows Server
2003 with the Microsoft .NET Framework installed.
- Microsoft Visual Studio .NET or Microsoft Visual Studio 2005 Enterprise Developer or
Microsoft Visual Studio .NET or Microsoft Visual Studio 2005 Enterprise Architect.
This article assumes that you have a general familiarity with
Windows applications. This article also assumes that the user account
has the correct permissions to install applications. back to the topCreate a Setup Project for a Windows ApplicationThis section demonstrates how to create a Windows
application project and how to use a compiled Setup
Project to install the Windows application. Create a Windows Application- Start Visual Studio .NET or Visual Studio 2005.
- On the File menu, point to
New, and then click Project.
- In the New Project dialog box, click
Visual Basic Projects under Project Type, and then click Windows Application under Templates. Name the project MyCalculator, and then click OK. By default,
Form1 is created.
Note In Visual Studio 2005, click Visual Basic under Project Type. - Add a Button control to Form1.
- To add an event handler for the Button1 control, double-click Button1.
- In the event handler, add the following code:
Shell("calc.exe", AppWinStyle.NormalFocus) - To build the Windows application click Build MyCalculator on the Build menu.
back to the
topCreate a Setup Project- On the File menu, point to Add
Project, and then click New Project..
- In the Add New Project dialog box, click
Setup and Deployment Projects under Project
Type, and then click Setup Project under Templates.
- In the Name box, type
MyCalculator Installer. The project is added to
Solution Explorer, and the File System Editor
appears.
- Click the MyCalculator Installer project in
Solution Explorer.
- In Properties, click the
ProductName property, and then type
MyCalculator .
Note The ProductName property determines the name
that will be used for the application in folder names and in the
Add/Remove Programs Control Panel. - To build the project, click Build
MyCalculator Installer on the Build menu.
back to the
topAdd a Windows Application to the Installer- Click the MyCalculator Installer project
in Solution Explorer. In the File System Editor, click the
Application Folder.
- On the Action menu, point to
Add, and then click Project Output.
- In the Add Project Output Group dialog
box, click MyCalculator in the Project
list.
- Click the Primary Output group, and then click OK.
- On the Build menu, click
MyCalculator Installer.
back to the
topVerify That the Setup Project works- In Solution Explorer, click the MyCalculator Installer project.
- To start the installer and to install the MyCalculator application, click Install on the Project
menu.
back to the topREFERENCES
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
307358
HOW
TO: Create Shortcuts for a .NET Deployment Project
For more information, visit the following
Microsoft Developer Network (MSDN) Web sites: back to the top
Modification Type: | Minor | Last Reviewed: | 10/3/2006 |
---|
Keywords: | kbvs2005swept kbvs2005applies kbDeployment kbHOWTOmaster kbSetupMan kbDev kbProgramming KB821766 kbAudDeveloper |
---|
|