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.

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

1. Whenever I connect to a machine by remote to fix a problem, two things need to be done first: 'chkdsk' and 'sfc / scannow' using an administrative command prompt. Chkdsk (check disk) checks if the file system is corrupt. If is corrupt, then you can have strange things like having the Microsoft Visual C++ stuck at the 'initializing' or 'processing' phase. The same can be said about the 'sfc /scannow' command. SFC stands for "system file checker" and scans the operating system for corrupt system files. Sometimes SFC can fix these errors; 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.

To begin:

(a) 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 "chkdsk" (no quotes) and hit enter. Check Disk should report no errors; if it reports errors, you will need to type in "chkdsk /f" (no quotes) and hit enter, then reboot the system to have it perform the fix. After the computer reboots, run "chkdsk" again using an administrative command prompt. It should report no errors. If you still have errors, repeat this entire step until no errors are reported.

Once chkdsk is clear, run "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. If you still have errors or if it 'found errors but can't fix them' then your operating system is corrupt. In this case, you can contact me for further assistance as this is beyond the scope of the article.

2. Next, 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 (create the "Temp" directory if it does not exist, first) because you will need to access the file through an administrative command prompt further down.

To run the 'repair' option, you need to open an administrative command prompt (the same as described in Step #1) and then copy and paste the text below into the command prompt. The 'repair' option should fix any issues with a corrupted Visual C++ install, including one that won't install in the first place. Note that all the C++ Redistributable files are labeled the same 2005-2017 versions - it's either vcredist_x86.exe or vcredist_x64.exe.

If you are attempting to install Microsoft Visual C++ Redistributable x86:

cd \temp
vcredist_x86.exe /repair
echo this is a dummy line

If you are attempting to install Microsoft Visual C++ Redistributable x64:

cd \temp
vcredist_x64.exe /repair
echo this is a dummy line

Highlight the text above, then right click over top of the highlighted text and select "Copy". Next, 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.

4. 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!



Rate this article: 
Average: 4.9 (14 votes)


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.