How to Fix Error Writing Temporary File: Yesterday, I was trying to install Team Viewer software on my Windows 10 machine. I downloaded Team Viewer from their official website and then started installing it by double-clicking the application file. However, as soon as I double clicked the setup file, an error message popped up and said:
Error Writing Temporary File: Make sure your temp folder is valid.
I got the same error around a year ago on my Windows 7 machine as well. Fortunately, I knew few methods this time to fix this error. But, I also thought of writing this article so that it can benefit other users also who are getting the same error.
WHY DOES ERROR WRITING TEMPORARY FILE OCCUR?
First of all, let me make this very clear that this error is not specific to Team Viewer or any other software. You can get this error while installing any software. It has nothing to do with the software being installed. It’s just some settings in your system that needs to be fixed.
Now coming back to the root cause of this error. Whenever you try to install any software on a Windows machine, it looks for the temp folder to store some data as it writes the registry. If the temp folder is not set up correctly on your system, this can very well cause Error Writing Temporary File. In such a case, we need to play a bit with the environment variables on our system which you will see shortly.
Now let us move on to see the methods to fix Error Writing Temporary File. In the upcoming section, you will get to look at a number of verified methods that can potentially resolve this issue. So, let us not waste any time further and jump directly to the methods given below to fix Error Writing Temporary File.
HOW TO FIX ERROR WRITING TEMPORARY FILE?
Let us get started to implement the methods to get rid of this error. By the end of this section, you should be able to install the software that this causing the Error Writing Temporary File.
METHOD 1: COMPRESS THE FOLDER (WORKAROUND)
This is one of the workarounds that has worked very well for most of the users. Since it is easy and less time consuming, we recommend you to implement this method first before trying to implement the other methods. Simply follow the steps given below to implement this workaround:
- Go to the Downloads folder and look for the Installer file that was causing this error.
- Right click on this file and choose the Send to option.
- This will open another menu. Here, choose Compressed (Zipped) folder option.
- Your installed file will be zipped inside a folder with the same name.
- Now open this zipped folder.
- Double click on the installer file to start the installation process.
- This should run now without any error. For me, this worked. However, if this workaround is not able to resolve this issue for you, better try the next methods that we listed below. These are much more technical and can resolve this issue once and for all.
METHOD 2: CHECK IF YOU HAVE CORRECT ENVIRONMENT VARIABLE SET UP
As mentioned above, this error usually occurs when the installer is not able to locate the temp folder on your machine. How would installer come to know the exact path of the temp folder? Well, we have some Environment Variables defined in our system. These variables let the installer know the exact path to the temp folder. Let us deep dive into this method and verify if we have the correct variables defined. If not, we can set them up correctly.
- Right click on My Computer/ Computer/ This PC depending on the Windows version you are using.
- This will open a Control Panel window. Here, click on Advanced System Settings option from the left menu.
- Now click on Environment Variables button.
- Here, you will see all the defined environment variables. You need check if you have TEMP and TMP environment variables defined exactly as shown in the screenshot below.
- If these are not defined in your system, simply click on the New button and add them one by one.
- Once done, try installing the software that was causing Error writing temporary file. Hopefully, you should be able to install the software this time.
METHOD 3: CLEAN REBOOT YOUR SYSTEM
The steps listed below will help you in clean rebooting your PC. This can also fix Error Writing temporary file issue. After implementing these methods, try to install the software that is causing this error and let us know how this method worked for you.
- Go to Control Panel and choose System and Security link.
- Now select Administrative Tools.
- Double click on System Configuration option.
- Now choose Services tab.
- Checkmark Hide all Microsoft services option.
- Now press Disable all button on the left. Click Apply and OK button.
- Now Restart the system by clicking on the Restart button.
- That’s all. You have clean rebooted your system. Now try installing the software and check if the error still persists.
So, these were the few methods to fix Error Writing Temporary File. Hope you liked this article on How to fix Error Writing Temporary File: Make sure you have a valid temp folder. In case of any issues regarding the methods given above, feel free to reach out to us via comments or Contact Us page. We will try to resolve your issue to the earliest. Stay tuned. Thanks.