Visual Studio fails to install with error "an unknown error occurred while copying files to temporary folder"


Solution 1

I've just finished dealing with this painful 'unknown error'.

First of all you need to be sure there are no previous versions damaged or bad-removed/uninstalled. A good practice is to use Perfect Uninstaller, here you can pick every component related and uninstall it, including SQL components which in my case got damaged when uninstalling VS2008. This may take a while because each time you select a component to uninstall, it loads its own uninstaller and independently if worked or not, it goes directly to the registry and through all the drives looking up for left files to delete. It worths it because it does the work for you.

After that, another thing is to get rid of the previous services, using Control Panel - Administrative Tools - Services, look-up for every SQL and VS service and double-clic each for knowing its exact name displayed as ServiceName:XXXX, and stop if running. Then in Start-Run type: sc delete XXXX , for each of the services. It must refer something like [ESC] Success Uninstalling...

After that, I went to the registry editor (Start-Run: regedit) and looked up for every Local Machine SOFTWARE Key referring Microsoft SQL and VS and deleted them. This was the worst stage because most of the keys have "Access Denied" for which you may go each by each (didn't know any way better) right-clicking each then going to Permissions... (it gives an error but just ignore) then go to Advanced(it gives another error but just ignore), then to Owner and there select your Administrator user account and clic OK. Back in Permissions... clic Add and type Administrators and clic enter. Now check the boxes for allowing Full Control permissions to administrators and clic OK. After that you should be able to delete it, if not, the reason is that there are hidden subkeys (they will appear after deletion failed) that need you to be the owner as described. This process is very painful because you need to own every single key in order to delete them, so you need to go inside every key until everyone is owned. The worst part is under Microsoft/Visual Studio...

Next step is to go to Program Files and delete those folders with SQL and VS that were left but are no more used.

Finally, I found useful to use Windows Install Cleanup and removed every thing I got rid off.

Then I just re-installed VS2010 and everything went very nice ;)

Expect an hours-in-a-road process...or just my case I didn't want to format and I think it was worth it because it took less time than personalizing and installing every single program again...

Hope this helps. =D

PS. I've also tried some tools you may found in google that are for VS removal but no one worked for me.

Solution 2

i have tried most of the suggestions, but it seems to be an addressing issue, running setup.exe from <dvdroot>/setup/setup.exe instead of using autorun.exe worked for me.

Solution 3

Ok, so there's some problem copying files to a location (your temporary directory %temp%). This could be caused by a TON of possible problems.

  1. Make sure you have enough space on your hard drive.
  2. If you are on a university computer contact your admin/tech support to see if they are forwarding your temp directory, have active directory on, or for some other reason have messed with the temp directory like limiting it's size.
  3. Re download the installer from the website, sometimes downloads become corrupt (unless you checked the MD5).

Related videos on Youtube

Author by


Happy computer science student :)

Updated on September 17, 2022