Microsoft KB Archive/148882

= PRB: Visual C++ 4.0 or 4.1 Setup Fails to Copy Shared DLLs =

Article ID: 148882

Article Last Modified on 11/18/2003

-

APPLIES TO


 * Microsoft Visual C++ 6.0 Enterprise Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual C++ 6.0 Standard Edition

-



This article was previously published under Q148882



SYMPTOMS
When you install Visual C++ 4.x in either Windows 95 or Windows NT, it is possible for setup to fail while copying certain shared DLLs. The DLLs that don't copy successfully will most likely be one of these:   MSVCRT20.DLL   MSVCRT40.DLL ODBCCP32.DLL  ODBC32.DLL    ODBCINT.DLL When setup fails, it displays a dialog box that looks similar to this:

  Setup cannot open the destination file 'C:\Windows\System\Msvcrt20.dll'. The file may be in use by  another application, or marked read-only. Close the application or change the file's read-only attribute and try again.

-or-

  Cannot install file C:\Windows\System\Odbc32.dll. It might be  in use. Try closing all applications and choosing Retry.

Both dialog boxes offer a chance to Abort, Retry, or Ignore.



CAUSE
Many applications use shared DLLs. If the setup program tries to copy a DLL over another DLL that has the same name while that DLL is in use by another program, the setup program will fail.

For example, the Windows 95 Explorer uses Msvcrt20.dll, so if the Explorer is not closed before running Visual C++ 4.x setup, you could see the problem. You may also see the problem when running The Internet Information Server as it also uses some of these DLLs.



RESOLUTION
Here are several possible resolutions:


 * 1) The best resolution is to make sure no other applications are running when you install Visual C++ 4.x. To do this, close all applications, and check the task list to make sure nothing is running. Under Windows 95, you can make sure other processes are not running by restarting your computer; hold down the SHIFT key as Windows 95 restarts to bypass the startup group.
 * 2) An additional workaround is to start Visual C++ Setup in the following manner:


 * 1) * Under Windows 95:

Close all applications including Explorer. Run setup from an MS-DOS window. If you are installing from the network, map to that drive.
 * 1) * Under Windows NT 3.51:

Close all applications. Run setup from File Manager or a DOS window.
 * 1) If all applications are closed, but the error still occurs, make sure that you close the Master Setup window; it uses Msvcrt20.dll.
 * 2) If the problem persists, it is generally safe to click Ignore, and continue with the installation. However, remember to manually copy the files from the Visual C++ CD-ROM that failed to copy during the setup.
 * 3) Another slightly riskier way to work around the problem is to rename the offending DLL from the system directory. Once the installation completes, restart your computer to cause the new version to be loaded.



STATUS
This behavior is by design.

Keywords: kbenv kbsetup kbprb KB148882

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.