Windows – Why not install Msvcr71.dll into system32

dllwindowswindows 7windows xp

While looking for an authoritative source for the missing Msvcr71.dll that is needed by a few old applications, I stumbled across the MSDN article Redistribution of the shared C runtime component in Visual C++. The advice given to developers is to drop the DLL into the application's directory instead of system32 since DLLs in this directory are considered before the system paths.

What can/will go wrong if I (as an administrator, not a developer) decide to take the lazy path and install Msvcr71.dll (and Msvcp71.dll while I'm at it) into the system32 directory (of 32 bit Windows XP or Windows 7 systems) instead of putting a copy in each application's directory? Is there another good solution to provide the applications with the needed DLLs that doesn't involve copying stuff to the application directories?

added after first answers: I understand that incompatible API changes may have been made to the mentioned DLLs, but pretty much every mention of incompatibilities I have found using Google had to do with games or video codecs. Right now, I expect that the risk of breakage is pretty small. Am I missing something?

Best Answer

The main (only?) problem is compatibility between different versions of Msvcr71.dll. Let's say 7.10.0 is slightly incompatible with 7.10.1 and an application App1 depends on the old behavior and an application App2 depends on the new behavior. Additionally both applications do not ship this C++ runtime itself. In this case one of the two applications will fail.

How often are those cases? I don't really know, but I'd say they are seldom.

Depending on the differences between msvcr71.dll versions an application would fail to start or a particular feature would not work.

Another good solution: own PATH for each application. For example, you could write a batch like this:

PATH=c:\PathToMSVCR71.DLL_Version_7.10.0
myapp1.exe

This way you can reuse the same DLL in multiple applications and update it easier.

EDIT It is almost impossible to estimate the danger of a version collision especially as you have not mentioned the applications you use. That is why I have searched for all the different versions on my PC (Windows 7/x64). I have found the following files: alt text

All the files are just copies of these two: 7.10.3052.4 and 7.10.6030.0. 7.10.3052.4 is also what dll-files.com offers.

I have also compared the output of dumpbin /imports /exports msvcr71.dll for these versions and neither exports nor imports have changed (as expected).

Related Question