Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot uninstall VC++2010: Error: A newer version of Microsoft Visual C++ 2010 Redistributable has been detected on the machine

I am trying to install the Microsoft Windows SDK for Windows 7 and .NET Framework 4. It fails, complaining about error 5100, as referenced at http://support.microsoft.com/kb/2717426 That link says to remove Microsoft Visual C++ 2010 x86 Redistributable and Microsoft Visual C++ 2010 x64 Redistributable. There is one big problem: Neither of these is installed on my box. This is a Win 7 box. Opening Programs and Features, I clearly have many instances of the Microsoft Visual C++ 2008 Redistributable, but not a single installed item beginning with "Microsoft Visual C++ 2010..."

However, if I click on "View installed updates" then I clearly see several updates on top of the not installed 2010 redistributable:

Microsoft Visual C++ 2010 x64 Redistributable (3)

  • Hotfix for Microsoft Visual C++ 2010 x64 Redistributable (KB982573)
  • Hotfix for Microsoft Visual C++ 2010 x64 Redistributable (KB2467173)
  • Hotfix for Microsoft Visual C++ 2010 x64 Redistributable (KB2151757)

Microsoft Visual C++ 2010 x86 Redistributable (3)

  • Hotfix for Microsoft Visual C++ 2010 x86 Redistributable (KB982573)
  • Hotfix for Microsoft Visual C++ 2010 x86 Redistributable (KB2467173)
  • Hotfix for Microsoft Visual C++ 2010 x86 Redistributable (KB2151757)

These items have no "uninstall" feature. So I evidently have hotfixes on top of something that is not installed. I downloaded the Visual Studio 2010 C++ redist and tried to run it to see if that would allow me to uninstall it, but nope, I get just a failure:

A newer version of Microsoft Visual C++ 2010 Redistributable has been detected on the machine.

I searched my entire C drive for any instance of vcredist_x64.exe and I ran each one of them hoping it would allow me to uninstall. Each one was either for C++ 2005 or 2008, or it gave me the same complaint that a newer version of 2010 has been detected and I have to remove it first.

Note that this question is not redundant to Error: A newer version of Microsoft Visual C++ 2010 Redistributable has been detected on the machine because that person didn't actually have to install Visual C++ 2010. Well, I don't have to install it. I have to uninstall it in order to install the SDK.

If there is nothing in Programs and Features, how can I uninstall this?

like image 658
Eddie Avatar asked May 01 '13 04:05

Eddie


1 Answers

DLL Hell is back with a vengeance for VS2010 and up. Too many programmers complained about the side-by-side install for the runtime DLLs and Microsoft gave up on it. Msvcr100.dll is back in c:\windows\system32 (or syswow64 on a 64-bit machine), invoking the usual problems with having a DLL in a directory that's on the path that every program looks at. And having more than one version of it.

There is more than one way for that DLL to get on the machine. It does not require running the vcredist installer. An install program typically just copies it there. One good example of an installer that does that is the VS2010 installer. Windows Update will whack that DLL when there's a security update. Which is what happened on your machine. So not finding the vcredist in your Programs and Features list and still having a later version of that DLL is not unusual.

Installers are of course supposed to handle this gracefully and not mess with a DLL when they see one with a later version already present. There is however nothing graceful about the Windows SDK installer. It has a long history of install problems. Whomever in the Windows group is responsible for that installer does not master the art very well. Using an old version of the SDK doesn't help, the one you are trying to deploy was especially troublesome. Sounds like v7.0, the installer for v7.1 was much improved.

So do favor v7.1 first. If that doesn't pan out then nothing you can do but set laser to stun and keep that installer happy. Rename msvcr100.dll in your Windows directory so the installer can't complain. Rename it back after it is done. Other runtime DLLs it is likely to want to whack are atl100, mfc100, mfcm100, msvcp100, vcomp100.dll

like image 114
Hans Passant Avatar answered Sep 20 '22 08:09

Hans Passant