BUG: Reinstalling a VB App Fails To Replace a Text File With The Same Date (216124)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q216124 SYMPTOMS
If you install a Visual Basic 6.0 application that includes a text file (or any file that does not have a version number) in the distribution set, and reinstall the application without removing it first, the following warning message is displayed:
A file being copied is older than the file currently on your system. It
is recommended that you keep your existing file.
CAUSE
The Visual Basic 6.0 application setup program incorrectly assumes that the text file on the system is newer than the one in the distribution set, even though the files have the exact same date.
RESOLUTION
The warning message is caused by the following statement in the CopySection Sub in the basSetup1 module of the Setup Toolkit project (Setup1.vbp):
If sFile.varDate <= FileDateTime(strDestDir & strDestName) Then
Because text files do not have version numbers, the dates are being compared. For the file to be installed, setup checks the date of that file in Setup.lst and sees if it is less than (<) or equal to (=) the date of the destination file (that is being overwritten in this case). If this statement is TRUE, it warns the user that the file being copied is older than the file on the system. As can be seen, the equal sign (=) causes the problem. If we change the "<=" to just "<" as in the following code segment, the error message will not be shown:
If sFile.varDate < FileDateTime(strDestDir & strDestName) Then
NOTE: You will need to recompile the Setup1.exe file after making the modification to the Setup Toolkit project (Setup1.vbp), and then you need to re-run the Project and Deployment Wizard (PDW) to recreate the application setup files.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. REFERENCES
For more information, please search the MSDN Library included within Visual
Studio 6.0 on the phrase "Setup Toolkit" for features of the wizard.
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbBug kberrmsg kbfix KB216124 |
---|
|