Q190173: INFO: How Setup Wizard and PDW Compare File Versions and Dates
Article: Q190173
Product(s): Microsoft Visual Basic for Windows
Version(s): 4.0,5.0,6.0
Operating System(s):
Keyword(s): kbwizard kbAppSetup kbVBp kbVBp400 kbVBp500 kbVBp600 kbVC kbGrpDSVB kbDSupport
Last Modified: 11-JAN-2001
-------------------------------------------------------------------------------
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows, versions 4.0, 5.0, 6.0
- Microsoft Visual Basic Enterprise Edition 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.
NOTE: Windows 2000 includes a feature called Windows File Protection (WFP) that
prevents the replacement of certain monitored system files. Please see the link
in the REFERENCES section to find more information about WFP.
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, click the article numbers below to view the articles
in the Microsoft Knowledge Base:
Q189743 INFO: Description of Setup.lst Sections
Q222193 Description of the Windows 2000 Windows File Protection Feature
Additional query words:
======================================================================
Keywords : kbwizard kbAppSetup kbVBp kbVBp400 kbVBp500 kbVBp600 kbVC kbGrpDSVB kbDSupport
Technology : kbVBSearch kbAudDeveloper kbZNotKeyword6 kbZNotKeyword2 kbVB500Search kbVB600Search kbVBA500 kbVBA600 kbVB500 kbVB600 kbVB400Search kbVB400
Version : :4.0,5.0,6.0
Issue type : kbinfo
=============================================================================
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.