How to Fix: Microsoft Visual C++ Hangs During Install

Dennis Faas's picture

Infopackets Reader Joe P. writes:

" Dear Dennis,

I have Windows 7 Ultimate 64bit. I am trying to install 'ON1 Photo Editor' on my machine which requires Microsoft Visual C++ 2015 Redistributable. The installer package for the ON1 Photo Editor includes the Microsoft Visual C++ 2015 Redistributable as part of the installation. During the installation, however, the Microsoft Visual C++ hangs during the install and does not proceed. I have let it sit for over 24 hours and nothing happens - the installation hangs and ultimately fails. I should also mention that my Windows Update is also broken and I haven't been able to download any updates for over a year. Can you please help? "

My response:

I asked Joe if he would like me to connect to his system to have a closer look at the issue using my remote desktop support service, and he agreed.

First things first: if the Windows Update is broken and the PC hasn't updated in quite a while, then it means that the system is susceptible to hackers, malware, ransomware and similar. The reasoning is that bugs in the operating system (exploits) are discovered all the time and these exploits need to be patched, otherwise your system is vulnerable. It is the same as leaving your front door of your home wide open, inviting burglars to come in and steal whatever they want. It's not a good idea and it needs to be addressed. Also, the non-security updates can also fix strange issues - as in the case with the C++ Redistributables not being installed properly.

With that said, I ran some tests on Joe's machine and I'll explain what I did to fix it.

Related: Can I remove Microsoft Visual C++ Redistributable?

How to Fix: Microsoft Visual C++ Hangs During Install

  1. Whenever I connect to a machine by remote to fix a problem, I always run 'sfc / scannow' using an administrative command prompt to ensure that the operating system is not corrupt. SFC stands for "system file checker" and is part of the Windows operating system.

    If Windows is corrupt it can cause something like the Microsoft Visual C++ stuck at the 'initializing' or 'processing' phase, so you can see why SFC is an invaluable tool when diagnosing strange Windows issues.

    If SFC finds errors, sometimes it can fix then, but sometimes it can't. Also based on my experience, even if SFC reports "No errors", it does not mean that the OS is not corrupt - it all depends on your system.

    To begin:

    (a) Important: bookmark this page now as you may need to reboot the system multiple times. To do so, press CTRL + D on the keyboard, then save the bookmark to your browser.

    (b) Next, click the Start button, then type in "CMD" (no quotes); wait for "CMD.EXE" or "Command Prompt" to appear in the list, then right click it and select "Run as Administrator". A black command prompt window will appear. Type in: "sfc /scannow" in the command prompt. If it reports no errors, move on to the second step. If it has errors can fixed them, run 'sfc /scannow' again to see if it still reports errors or if it has no errors. If no errors, move onto the second step.

    IMPORTANT: If you still have errors or if it 'found errors but can't fix them' then your operating system is corrupt. You can try the proceeding steps but most likely it won't work. In this case, you can contact me for further assistance as this is beyond the scope of the article.
     
  2. Assuming you have no SFC errors (described in Step #1), download the Update for Universal C Runtime in Windows patch. While researching the issue as to what causes Microsoft Visual C++ to hang during the 'initializing' phase, I found a Microsoft patch KB#2999266, which is reported to fix the issue.

    In Joe's case, he did not have this patch because his Windows Update was broken. This patch applies to all versions of Windows, so it is recommended that you download it before continuing. Once the download Update for Universal C Runtime in Windows is complete, run the installer patch, then proceed to the next step.
     
  3. Next, download the version of Microsoft Visual C++ Redistributable (link below) that hangs during the install and use the 'repair' option using an administrative command prompt. You will need to run the executable with the repair option - described further down.

    Note that these Microsoft Visual C++ Redistributable packages are direct from Microsoft and contain the latest Visual C++ patches for that version. In Joe's case the C++ redistributable was part of the "ON1 Photo Editor" and may not have contained the latest patches, which may also fix the 'initializing' hang.

    Here are all the download links for Microsoft Microsoft Visual C++ as of August 2018. Please save the file to C:\Temp or the repair won't work using my script in Step #4 (note: create the "c:\Temp" directory if it does not exist, first):

    Microsoft Visual C++ 2017 Redistributable x86
    Microsoft Visual C++ 2017 Redistributable x64
    Microsoft Visual C++ 2015 Redistributable x86
    Microsoft Visual C++ 2015 Redistributable x64
    Microsoft Visual C++ 2013 Redistributable x86
    Microsoft Visual C++ 2013 Redistributable x64
    Microsoft Visual C++ 2012 Redistributable x86
    Microsoft Visual C++ 2012 Redistributable x64
    Microsoft Visual C++ 2010 Redistributable x86
    Microsoft Visual C++ 2010 Redistributable x64
    Microsoft Visual C++ 2008 Redistributable x86
    Microsoft Visual C++ 2008 Redistributable x64
    Microsoft Visual C++ 2005 Redistributable x86
    Microsoft Visual C++ 2005 Redistributable x64
     
  4. Next, highlight the text below using your mouse. This is syntax which will initiate the repair for either x86 or x64 MS visual C++ redistributable:

    C:
    cd \temp
    vcredist_x86.exe /repair
    vcredist_x64.exe /repair
    echo this is a dummy line
     
  5. Right click over top of the highlighted text and select "Copy".
     
  6. Go to the administrative command prompt window you opened in Step #1 above. Then, right click the mouse in the middle of the administrative command prompt window and select "Paste". The text should output the command line and the Microsoft C++ Redistributable should begin installing with the repair option.

At this point the Microsoft Visual C++ Redistributable should have installed properly. If it does not, you are welcome to contact me - described next.

Additional 1-on-1 Support: From Dennis

If all of this is over your head, or if you can't get Microsoft Visual C++ Redistributable installed on your machine despite the instructions in this article, I can fix it for you using my remote desktop support service. Simply contact me, briefly describing the issue and I will get back to you as soon as possible.

Got a Computer Question or Problem? Ask Dennis!

I need more computer questions. If you have a computer question -- or even a computer problem that needs fixing - please email me with your question so that I can write more articles like this one. I can't promise I'll respond to all the messages I receive (depending on the volume), but I'll do my best.

About the author: Dennis Faas is the owner and operator of Infopackets.com. With over 30 years of computing experience, Dennis' areas of expertise are a broad range and include PC hardware, Microsoft Windows, Linux, network administration, and virtualization. Dennis holds a Bachelors degree in Computer Science (1999) and has authored 6 books on the topics of MS Windows and PC Security. If you like the advice you received on this page, please up-vote / Like this page and share it with friends. For technical support inquiries, Dennis can be reached via Live chat online this site using the Zopim Chat service (currently located at the bottom left of the screen); optionally, you can contact Dennis through the website contact form.

Rate this article: 
Average: 4.9 (14 votes)

Comments

whyodf_11779's picture

I used your very good article on WS2012 to install LibreOffice updates. Just advising that microsoft may have renamed the redistributables mine was called "vc_redist.x64.exe". Apart from that small change following your article worked flawlessly. 4 stars!

sirakoms_12277's picture

I am still getting an error message. Where exactly am i supposed to start the copy of
command instruction from.