Escolar Documentos
Profissional Documentos
Cultura Documentos
Article ID: 830761 - Last Review: May 18, 2007 - Revision: 2.13 Other Resources
Best practices for deploying Visual Basic 6.0 applications Other Support Sites
SUMMARY
This article discusses how to prepare to deploy a Microsoft Visual Basic 6.0 application. View related
content
To prepare a Visual Basic 6.0 application for deployment, make sure that you do the
VBRun60sp6.exe
following: installs Visual Basic 6.0
SP6 run-time files
Plan ahead and budget time to package and to test the application. FILE: VBRun60sp4.exe
Installs Visual Basic 6.0
Package the application on a "clean" computer. SP4 Run-Time Files
Use the same software configuration on both the development computer and the How To Deploy an
ActiveX C ontrol with the
packaging computer. Package and
Deployment ...
Identify and minimize application dependencies.
VBRun60.exe installs
Prepare the Package and Deployment Wizard Redist folder. Visual Basic 6.0 run-
time files
Microsoft Visual Basic
To troubleshoot a deployed Visual Basic 6.0 application, use the following methods: 6.0 International
Package and
Use the tools for troubleshooting deployment issues. Deployment Kit
The Visual Basic 6.0 Package and Deployment Wizard was designed to deploy applications to
Microsoft Windows 95, Windows 98, and Microsoft Windows NT 4.0 or later. However, for
obsolete operating systems, such as Windows 95, Microsoft provides support for deploying
Visual Basic 6.0 applications on a "best effort" basis after the problem is identified as being
specific to the operating system.
For information about the life cycle of a specific version of Internet and MSN, visit the following
Microsoft Web site:
http://support.microsoft.com/gp/lifeselectintmsn
Note Microsoft does not provide support for deploying or for running Visual Basic 6.0
applications on Windows NT 4.0 Terminal Server.
converted by Web2PDFConvert.com
For more information about how to run Visual Basic 6.0 applications on Windows NT 4.0
Terminal Server, click the following article number to view the article in the Microsoft Knowledge
Base:
196201 Visual Basic is not supported on Terminal Server 4.0
Package on a "clean" computer. A "clean" computer is a computer that has only the
required software installed to develop and to package a Visual Basic application. At a
minimum, that software includes only the operating system and Visual Studio 6.0.
If your application requires other components, you must also install them. However, it is
a good idea to avoid installing anything that is not required, such as beta software, or
anything that might change the redistributable files that your application package
requires.
Install the latest operating system and the latest Visual Studio 6.0 service pack. Make
sure that you have installed the latest service packs and that you have applied the latest
updates for the operating system on both the development computer and the packaging
computer. To apply the latest updates for your computer, visit the following Microsoft
Windows Update Web site:
http://windowsupdate.microsoft.com
Additionally, make sure that you have installed the latest Visual Studio 6.0 service pack
on both the development computer and the packaging computer. To obtain the latest
Visual Studio 6.0 service pack, visit the following Microsoft Developer Network (MSDN)
Web site:
http://msdn2.microsoft.com/en-us/vstudio/aa718359.aspx
Make sure that the development computer and the packaging computer have the same
software. If you are packaging the application on a computer other than the
development computer, make sure that both computers have the same software
configuration. For example, make sure that both computers:
Are running the same operating system version.
Have Visual Studio 6.0 installed.
Have the same service packs installed for the operating system and for Visual
Basic 6.0.
Use the same versions of external components that your application uses, such
as Microsoft Data Access C omponents (MDAC ).
Additionally, if you are packaging the application on a computer other than the
development computer, make sure that the compiled versions of your binaries work
correctly on the packaging computer. If you receive an error message when you run
your application on the packaging computer, the error message may indicate that one of
the application's dependencies is missing or has a versioning problem.
Generally, the Package and Deployment Wizard does a good job of redistributing the correct
dependencies for your application. However, to minimize problems, minimize the dependencies
that your application requires.
The main dependencies in a Visual Basic 6.0 application are component references and C OM
library references. C omponent references include ActiveX controls or designers that are located
in an external .ocx file or in an external .dll file. When you select an ActiveX control in the
Components dialog box, Visual Basic puts an icon for the control in your control toolbox and
then adds a reference to the external library in the Visual Basic project.
If a component requires a supporting DLL, Visual Basic automatically adds the DLL as a library
reference in the References dialog box. A C OM library reference is a reference to a type
library (DLL, TLB, OLB) that has been selected in the References dialog box.
When the Package and Deployment Wizard determines the files to deploy with your application,
the Package and Deployment Wizard reviews the project file to determine which components
and which C OM library references the project uses. The Package and Deployment Wizard then
searches for any dependency files (.dep) that are associated with these components to
determine if any supporting files must be redistributed with the application.
Verify that the project does not reference any components or libraries that are not required so
that the Package and Deployment Wizard does not try to redistribute files that the application
does not require.
Project components
To identify and to minimize references to components in your project, follow these steps:
Note If you do not know whether your project uses a component, click to clear the
check box next to that component. If you receive an error message that is similar to the
following, your application uses that component:
converted by Web2PDFConvert.com
C an't remove control or reference; in use
Project references
To identify and to minimize references to C OM libraries in your project, follow these steps:
Note If you do not know whether your application uses a reference library, click to clear
the check box to that reference library. If you receive an error message such as the
following, your application uses that reference library:
After the Package and Deployment Wizard determines the application's dependencies, the
Package and Deployment Wizard tries to locate the files that it has determined must be
included with the Setup package. The first location that the Package and Deployment Wizard
scans is the Redist folder.
If the Package and Deployment Wizard does not locate the required files in the Redist folder, it
tries to locate the files in other folders, such as the System32 folder. This behavior may cause
problems because your operating system may contain versions of system files that are not
compatible with earlier operating systems. Therefore, make sure that the Redist folder contains
the correct versions of any files that the Package and Deployment Wizard copies from your
system.
If you have installed Visual Basic 6.0 Service Pack 4 or later, the Redist folder already contains
most of the files that the Package and Deployment Wizard requires for the package. However, if
you have specific versions of files that you want to redistribute with the application, make sure
that you copy them manually to the Redist folder.
Additionally, if you use a packaging script that you have saved from an earlier application
packaging project, the Package and Deployment Wizard collects the files from the location that
appears in the earlier packaging script. The Package and Deployment Wizard will not collect the
dependencies from the Redist folder unless it collected them from the Redist folder earlier.
Back to the top
The third-party products that this article discusses are manufactured by companies that are
independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the
performance or reliability of these products.
Regmon
Regmon (Regmon.exe) monitors registry access on a real-time basis. You can use Regmon to
determine which applications are accessing the Windows registry. For more information about
Regmon, visit the following Sysinternals Freeware Web site:
http://technet.microsoft.com/en-us/sysinternals/default.aspx
To use Regmon, follow these steps:
1. Install Regmon. To obtain Regmon, visit the following Sysinternals Freeware Web site:
http://technet.microsoft.com/en-us/sysinternals/bb963881.aspx
2. Start Regmon. Notice that Regmon immediately starts to log all registry activity.
3. On the File menu, click to remove the check mark next to Capture Events to stop
logging.
converted by Web2PDFConvert.com
4. Prepare your application for monitoring. When you are ready to monitor your
application, go to step 5.
5. On the File menu in Regmon, click to select Capture Events.
6. Reproduce the problem that you are trying to solve.
7. Switch to Regmon, and then click to remove the check mark next to Capture Events to
stop logging.
8. On the File menu, click Save. Save the log file as a .log file so that you can analyze the
output.
Note You may want to import the .log file into Microsoft Excel so that you can filter the
data more easily.
For more information about Regmon, see the Regmon online Help file.
Filemon
Filemon (Filemon.exe) monitors file access on a real-time basis. You can use Filemon to
determine which applications are accessing files on the system. For more information about
Filemon, visit the following Sysinternals Freeware Web site:
http://technet.microsoft.com/en-us/sysinternals/default.aspx
1. Install Filemon. To obtain Filemon, visit the following Sysinternals Freeware Web site:
http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx
2. Start Filemon. Notice that Filemon immediately starts to log all file activity.
3. On the File menu, click to remove the check mark next to Capture Events to stop
logging.
4. Prepare your application for monitoring. When you are ready to monitor your
application, go to step 5.
5. On the File menu in Filemon, click to select Capture Events.
6. Reproduce the problem that you are trying to solve.
7. Switch to Filemon, and then click to remove the check mark next to Capture Events to
stop logging.
8. On the File menu, click Save. Save the log file as a .log file so that you can analyze the
output.
Note You may want to import the .log file into Microsoft Excel so that you can filter the
data more easily.
For more information about Filemon, see the Filemon online Help file.
Dependency Walker
Dependency Walker (Depends.exe) is used to determine the explicit dependencies that a file
has. A dependency is a secondary file that a file requires to load or to run correctly. For
example, a Microsoft Visual Basic application depends on the Microsoft Visual Basic run-time
files.
Dependency Walker also includes a profiling feature that you can use to monitor the way that
your application loads and the way that your application runs. This feature is useful for
troubleshooting a Visual Basic application that has problems during startup. For more
information about Dependency Walker, visit the following Dependency Walker Web site:
http://www.dependencywalker.com
To use Dependency Walker to profile your application, follow these steps:
1. Install Dependency Walker. To obtain Dependency Walker, visit the following Dependency
Walker Web site:
http://www.dependencywalker.com
2. Start Dependency Walker.
3. On the File menu, click Open.
4. In the Open dialog box, click the application's .exe file, and then click Open.
5. On the Profile menu, click Start Profiling.
6. In the Profile module dialog box, configure the options that you want, and then click
OK.
You can view the log window while your application is loading to see which modules load
successfully.
For more information about Dependency Walker, see the Dependency Walker online Help file.
ListDLLs
ListDLLs outputs the names and the versions of all modules that are loaded in a specific
process. You can use ListDLLs when a deployed application works on some computers but not
on others. You can also use it to compare the versions of modules that are loaded. This
information is helpful for determining if any mismatches exist between the loaded modules and
your application's dependencies.
1. Install ListDLLs. To obtain ListDLLs, visit the following Sysinternals Freeware Web site:
http://technet.microsoft.com/en-us/sysinternals/bb896656.aspx
Note ListDLLs is a console application. Therefore, you may want to copy the
ListDLLs.exe file to a folder that is easily accessible on the computer, such as C :\.
2. Start your application.
3. At the command prompt, type the following command, and then press ENTER:
Listdlls MyApplication.exe > C:\MyApplicationOutput.txt
converted by Web2PDFConvert.com
The output file will contain the names and the versions of all modules that were loaded in
process to your application.
For more information about tools that you can use to troubleshoot deployed Visual Basic 6.0
applications, click the following article numbers to view the articles in the Microsoft Knowledge
Base:
198038 Useful tools for Package and Deployment issues
330314 Your computer does not restart after you install a Microsoft Visual Basic 6.0
application that includes a Msvcrt.dll file
216231 Application Setup errors while displaying "copying files, please stand by"
217754 How to control which MDAC version the Package and Deployment Wizard
(PDW) distributes
299645 Error "unable to register Msado15.tlb" if you use a PDW package to install a VB
application
Note Microsoft only supports the deployment of a Visual Basic 6.0 application if you deploy the
application by using the Package and Deployment Wizard.
If you plan to use other deployment technologies, consider the following recommendations to
help you successfully redistribute your application.
Msvbvm60.dll
Oleaut32.dll
Olepro32.dll
Asycfilt.dll
Stdole2.tlb
C omcat.dll
If you are using Visual Studio Installer to build an installer package, these files are already
included in a merge module that is added to your installer package when you build the installer
package. If you are using an alternative installer technology, make sure that you redistribute
these files, together with any other dependencies that your application requires.
If you want to add these files manually to your redistribution package, copy these files from the
Redist folder on a computer where Visual Basic 6.0 and its latest service pack are installed. By
using this method, you can make sure that your package does not include newer versions of
operating system files that may cause problems during installation.
converted by Web2PDFConvert.com
Note Only a Package and Deployment Wizard Setup package requires the
Vb6stkit.dll file.
The [Setup1 Files] section lists all other dependencies and any other files that you
have added to the Setup package.
Review these lists to verify that your alternative installation package also installs these
files.
After you have followed these steps, if you are still experiencing problems when you run the
deployed application, try to install the application by using the Setup package that you built by
using the Package and Deployment Wizard. Then, verify that the application that you installed
by using the Package and Deployment Wizard Setup package works successfully. If you cannot
do this, consider troubleshooting the issue by using one of the tools that is mentioned in the
"Tools for troubleshooting deployment issues" section.
For more information about third-party installers and Visual Basic applications, click the
following article numbers to view the articles in the Microsoft Knowledge Base:
257773 Support for third-party installers
APPLIES TO
Microsoft Visual Basic Enterprise Edition for Windows 6.0
Microsoft Visual Basic 6.0 Professional Edition
Submit
converted by Web2PDFConvert.com