Cannot install Unity!

A few days ago, Unity was working perfectly, then I installed a beta version of Unity. For some reason, this just did not work, so I uninstalled the version, and tried reinstalling a stable version of Unity. However, during installation, and deleting old Unity installation files, I encounter an error:
87016-unity-install-fail.png

If I press ‘ignore’, then it will proceed to install Unity, however I would not be able to run Unity at all. Furthermore, the folder ‘Unity’ in ‘Program Files’ is locked for some reason, and I cannot delete it to ensure it was properly uninstalled (I want to uninstall so that I can do a clean re-install).

Despite the error, I have absolutely no Unity tasks running in Task Manager, and therefore and completely confused and stuck with this problem. Any ideas for a solution?

Thank you

Don’t really need to reboot the computer. Just open the task manager → Details and search for VBCSCompiler.exe and end that task. Done.

Try to install unity to a different path like C:\Program Files\Unity New. Later you will still have to somehow delete the old installation, I see it is somehow messed up.

Best thing to do is reboot the computer. I got that problem too, and it turned out having any copy of Visual Studio open caused it. Reboot so you don’t have any active programs, and it should run fine.