INFO: How Setup Wizard and PDW Compare File Versions and Dates
ID: Q190173
|
The information in this article applies to:
-
Microsoft Visual Basic Professional and Enterprise Editions for Windows, versions 4.0, 5.0, 6.0
SUMMARY
When you run a setup program created using the Setup Wizard in Visual Basic
4.0 and 5.0 or using the Package and Deployment Wizard (PDW) in Visual
Basic 6.0, existing files on the computer are automatically replaced if the
setup files include a newer version of the file. This article describes how
the setup program compares the source and destination files to determine
which one is newer.
MORE INFORMATION
The setup program created by the Setup Wizard and PDW is actually two
programs. The first one is a C program called Setup.exe that installs the
"bootstrap" files and then spawns a Visual Basic program called Setup1.exe
to install the remaining files. Setup.exe and Setup1.exe differ slightly in
the way they compare files.
NOTE: Setup1.exe is based on the Setup Toolkit project (Setup1.vbp). A
developer can modify the Setup Toolkit project and rename it, so Setup1.exe
may have another name.
Setup.exe
Setup.exe compares each source and destination bootstrap file in the
following manner:
- If both the source and destination files have version numbers,
Setup.exe compares the version numbers.
- If the destination file does not have a version number, Setup.exe
assumes the source file is newer.
Three bootstrap files get special handling and are treated as follows:
- _Msrstrt.exe is always overwritten.
- Setup1.exe is always overwritten.
- Ctl3d32.dll is only installed on computers running NT 3.51.
NOTE: To see which files are installed by Setup.exe, open the Setup.lst
file for your distribution set. Setup.lst is a text file created by the
Wizard, and it contains all the information needed by Setup.exe and
Setup1.exe. If you used the Setup Wizard to create the distribution set,
the bootstrap files are listed in the [Bootstrap] section of Setup.lst. If
you used the PDW to create the distribution set, the bootstrap files are
listed in the [Bootstrap Files] section.
Setup1.exe
There are three cases Setup1.exe must check when determining whether the
source file is newer than the destination file:
- If both files have version numbers, the numbers are compared.
NOTE: The version number of the source file is usually listed in
Setup.lst. If the version information is not there, Setup1.exe gets the
version number directly from the source file.
- If one file has a version number and the other does not, the one with
the version number is considered newer.
- If neither file has a version number, the dates of the files are compared.
NOTE: The Setup.lst file generated by the PDW contains dates with
two-digit years, such as 1/1/98. Visual Basic interprets 1/1/00
through 12/31/29 as January 1, 2000, through December 31, 2029, and
1/1/30 through 12/31/99 as January 1, 1930, through December 31,
1999.
If Setup1.exe determines that the source file is newer than the destination
file, the destination file is overwritten automatically. However, if
Setup1.exe determines that the source file is older than the destination
file, it takes one of the following actions:
- If you used the Visual Basic 4.0 or 5.0 Setup Wizard, the destination
file is kept if it is newer.
-or-
- If you used the Visual Basic 6.0 PDW, Setup1.exe notifies end users
and allows them to decide whether to keep the destination file,
overwrite the destination file with the older source file, or overwrite
all files.
NOTE: While the Setup.lst file generated by the Setup Wizard in versions 4.0 and 5.0 of Visual Basic uses dates with four-digit years, the Setup.lst file generated by the PDW contains dates with two-digit years, such as 1/1/98. By default, Visual Basic interprets 1/1/00 through 12/31/29 as January 1, 2000 through December 31, 2029 and 1/1/30 through 12/31/99 as January 1, 1930 through December 31, 1999.
REFERENCES
"Distributing Your Applications" chapter of the "Programmer's Guide"
For additional information, please see the following article in the
Microsoft Knowledge Base:
Q189743
INFO: Description of Setup.lst Sections
Additional query words:
kbDSupport kbVC kbAppSetup kbVBp kbVBp600 kbdss kbVBp400 kbVBp500
Keywords : kbGrpVB
Version : WINDOWS:4.0,5.0,6.0
Platform : WINDOWS
Issue type : kbinfo
|