DOCUMENT:Q190173 07-AUG-1998 [vbwin] TITLE :INFO: How Setup Wizard and PDW Compare File Versions and Dates PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:4.0,5.0,6.0 OPER/SYS:WINDOWS KEYWORDS: ====================================================================== --------------------------------------------------------------------- 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. 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: To see which files are installed by Setup1.exe, look at the files listed in the [Files] section of Setup.lst if you used the Setup Wizard. If you used the PDW, look at the files listed in the [Setup1 Files] section of Setup.lst. REFERENCES ========== "Distributing Your Applications" chapter of the "Programmer's Guide" For additional information, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q189743 TITLE : Description of Setup.lst Sections Additional query words: kbDSupport kbVC kbAppSetup kbVBp kbVBp600 kbdss kbVBp400 kbVBp500 ====================================================================== Version : WINDOWS:4.0,5.0,6.0 Platform : WINDOWS 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 1998.