When you install a Microsoft Visual Basic 6.0 application that you package by using the Package and Deployment Wizard on a computer that is running Microsoft Windows 2000, Windows XP, or Windows Server 2003, you receive the following error message:
Setup cannot continue because some system files are out of date on your system. Click OK if you would like setup to update these files for you now. You will need to restart Windows before you can run setup again. Click cancel to exit setup without updating system files.
If you click OK to update the files and to restart Windows, you receive the same error message when you run Setup.exe to complete the installation.
This problem occurs when the setup package tries to install a newer version of a file that is protected by the Windows File Protection feature on the operating system. For example, if the setup package was built on a computer that is running Windows Server 2003 and the setup package includes a file that is protected by the Windows File Protection feature, this problem occurs on computers that have an older version of the same file and that are running Windows XP or Windows 2000.
When the Setup program installs the setup package, the Setup program compares the version of the file that is already on the operating system with the version of the file that is included in the setup package. If the file that is included in the setup package is newer than the file that is already on the operating system, the Setup program replaces the version of the file that is on the operating system and then prompts you with the message that the Setup program must restart the computer.
After the file is replaced, the Windows File Protection feature detects that the file has been replaced and then reverts the file back to the original version. After the Setup program reboots and then runs Setup.exe again, the cycle repeats.
To resolve this problem, verify that the setup package does not redistribute system files that are newer than the files on the target operating system. To do this, use the following procedures.
Apply the latest Visual Basic 6.0 service pack
Apply the latest Visual Basic 6.0 service pack on the build computer. Beginning with Visual Basic 6.0 Service Pack 4, older versions of required system files are located in the Redist folder on the build computer. When the Package and Deployment Wizard assembles a package, it searches the Redist folder first for dependencies. Therefore, new package builds use the older versions of the required system files that are located in the Redist folder. This way, the package distributes newer versions of the required system files. The Redist folder is in the following location:
Remove the commonly redistributed system files from the setup package
Make sure that your setup package does not redistribute unnecessary system files. Every Visual Basic 6.0 application requires that the following OLE Automation system files be installed to function. These files should be installed with the setup package. If you apply Visual Basic 6.0 Service Pack 4 or later on the build computer, the Package and Deployment Wizard packages older versions of these files from the Redist folder, as discussed in the previous section.
Other than these files, there is typically no reason to redistribute system files with a Visual Basic 6.0 setup package. System file redistribution should only be completed with operating system service packs or with hotfixes.
Note MSVBVM60.dll is also a required file for Visual Basic applications to function. This file is not a system file and is not part of Windows File Protection.
System files that should be excluded from your redistributable package
When you use the Package and Deployment Wizard to package your application, examine the list of files that are being redistributed on the Included Files screen. Click to clear the check box next to following files if they are listed:
A good way correct a setup package is to discard the setup package and then build a new setup package by using the Package and Deployment Wizard, after you follow the procedures that are discussed in the previous sections.
Also, to make sure that the Package and Deployment Wizard first tries to locate files from the Redist folder, do not select a packaging script when you start the Package and Deployment Wizard. The Package and Deployment Wizard tries to locate the files from the same location that it used during the previous packaging attempt. Although the correct version of a file may be located in the Redist folder, the Package and Deployment Wizard may not use the correct version of the file if it packaged the file from a different location during the previous packaging attempt.
If you must correct this problem in a setup package that has already been assembled, you can edit the Setup.lst file to prevent installation of the offending system files. To do this, follow these steps:
Open the Setup.lst file in a text editor such as Notepad.
Locate the [Bootstrap Files] section and the [ PackageName Files] section.
Note In this step, PackageName is a placeholder for the actual package name.
Check to see if these sections include one or more of the files that are listed in the "System files that are commonly redistributed with Visual Basic packages" section. If so, remove the entry, and then renumber the remaining file entries in the section.
Save the file, and then close the file.
Make sure that the modified Setup.lst file is located in the same folder as the Setup.exe file and the CAB file for your setup package.
The next time that you run the Setup program, the package does not try to install the files that you removed from Setup.lst.
This behavior is by design.
For additional information, click the following article number s to view the article s in the Microsoft Knowledge Base:
222193 Description of the Windows File Protection feature
330314 PRB: Your computer does not restart after you install a Microsoft Visual Basic 6.0 application that includes a MSVCRT.dll file