Wanted to add this question to the pool in case someone has the same problem
I was unable to update Visual Studio 2017
on Windows 7
and got the following error:
Unable to install the files to target location. Error: The folder
'c:\Program Files (x86)\Microsoft Visual Studio\Installer'
or a file within it is locked by another program. Close any applications that might be using it and try again.
Please go to Windows Update, ensure that all recommended Windows Updates are installed and completed, then reboot your PC. (Open Windows Settings ( Windows + I ) -> Go to Update & Security > Troubleshoot.
Please remove the folder: C:\Program Files (x86)\Microsoft Visual Studio\Installer. Then, re-download the bootstrapper file from the following Microsoft Site and run it as administrator. If the answer is helpful, please click "Accept Answer" and upvote it.
The initial solution I found was to reinstall Visual Studio but felt that it might be unnecessary. The solution I found was to close down visual studio, go to "c:\Program Files (x86)\Microsoft Visual Studio\Installer", rename the folder "Installer" to something else then run vs_installer.exe from the renamed folder.
Hope that help someone.
I just recently encountered the same error while trying to update the Visual Studio 2017 installer on Windows 10. In my case, the c:\Program Files (x86)\Microsoft Visual Studio\Installer
directory was locked because of virus/malware scanning software running in the background. After stopping that, the installation of the VS 2017 installer had no more problems.
What initially misled me about the source of the problem was that the process which had a lock on the files in that directory was the special System
process in Process Explorer, so I was initially going down the wrong rabbit hole.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With