We usually don't expect any problems after double-clicking an installer file or right-clicking to uninstall an application. However, sometimes an error message may appear on the screen saying, "Error writing temporary file. Make sure the Temp folder is valid." If you can't get rid of the annoying message, one of the following methods will fix the problem in Windows 10 and Windows 11.
Tip: Want to make sure the installation file is free of malware? Use one of the links from a reputable website toDownload all official Windows programs.
What is the NSIS error “Make sure the Temp folder is valid”?
NSIS (Nullsoft Scriptable Install System) errors are specific types of errors that affect Windows installers, indicating that their .EXE files have been corrupted due to software changes, incomplete downloads, or viruses that sneak in during installation. Notable NSIS errors include the error we discuss in this article and “Error starting the installer".
The Windows Temp folder plays a crucial role in installing or uninstalling any application/program, as it houses all temporary files and cached data. If the Temp folder is not set up properly, or if there are any memory issues/malware, the user will not have permissions to read/write .EXE files. This means they cannot modify it to complete the installation or uninstallation.
Under these circumstances, when you double-click the .EXE setup file or right-click to uninstall in the Control Panel, a pop-up message appears explaining this NSIS error: “Error writing temporary file. Make sure the Temp folder is valid.”
Even if you're not dealing with installation issues, the annoying message may appear after you restart your computer and will continue to update on your screen every few minutes. It doesn't go away automatically.
To deal with the problem, you will need to reclaim ownership and path of the Temp folder in one of the following ways.
1. Delete temporary files in Windows
It's always a good idea to delete temporary files and cached data from the Temp folder. They take up a lot of disk space, and some of these files may be responsible for causing conflicts with the installer.
- Open a path Temp folder using the . command Windows Run ، Win + R , then type %temp%.
- This will launch a new Windows File Explorer window where all temporary files are visible.
- Select the entire contents of a folder. Temp using Ctrl + A and press the . button Delete.
- Not all temporary files are deleted during the first attempt. You will need to keep pressing the button. “Try again” Until they are all cleared.
- Once you have nothing left, update. Temp window Try installing/uninstalling the app.
Tip: Apart from the Temp folder, there are many other Other ways to clear the cache in Windows , such as Disk Cleanup, DNS Cache, Storage Sense setup, and more.
2. Redownload the program and start a new installer.
Error can occur “Make sure the temp folder is valid” If malware is found in the installer, it's recommended to wait a while and download the program again. The developers have likely released the latest version of the program and addressed any outstanding issues.
If you install the older version, the new installer will overwrite everything, and you can easily uninstall the new version later.
3. Run the installation from the created zip folder.
Here's a neat workaround that will get the installer up and running in no time. While ZIP files can become corrupted during the download process, compressing the downloaded .EXE installer file is actually safer. It overwrites all installation information within the compressed folder instead of the destination disk. When you run the installer within the compressed folder, it bypasses the error entirely.
- Go to Vol Where your installer file is located.
- in Windows 11 Right click to select the option “Compress to ZIP file”Windows 10 users may be prompted to select a compression program, such as WinRAR Or winzip.
- A compressed folder is created containing all installation files and dependencies.
- Navigate to the compressed folder path in Windows 11 and right click to select "to open". The installer will run from within the compressed folder. Windows 10 runs it from within the compressed folder program window.
Did you know that you can Open ZIP and RAR files Easily in Google Drive? This is a good option for improving compression and malware scanning using Google's servers.
4. Configure Windows folder permissions to disable read-only access
This method should only be applied if you are unable to locate the temporary folder in the path assigned to it that was tracked using environmental variablesThis will prevent you from making any changes to the Temp folder, which can cause problems installing or uninstalling the program. The solution is to disable access. Read only.
- Open System properties From the matter Windows Run by typing sysdm.cpl And press on Enter.
- Go to the tab "Advanced Options" and open environmental variables within “Startup and Recovery”.
- Check the path of the variables "Temp" و “Tmp” And write them down somewhere.
- Go to folder path Temp in window file explorer. If you can't find it here, it means you don't have permission to access the Temp folder.
- To fix the problem, first find the location of the Temp folder using ٪temp٪ In the matter Windows Run.
- Go back to the Environment Variables window and edit Temp under “User variables” To point to the correct temporary folder path. Do not modify “system variables”, By default, it will point to “C:\Windows\Temp.”
- Go to “C:\Windows” Right-click on the Windows folder to open its properties.
- Go to the tab "general". Theme is enabled Read only By default. Disable it and apply the changes.
- Repeat the same thing with other folders in Windows, such as: System32 and a volume “Temp”.
- Restart your computer Notice the changes.
of Good to know: Accessing relevant Windows folders can sometimes be difficult. For example, you'll need to try different methods to control the WindowsApps folder.
5. Check for memory problems using Windows Memory Diagnostic
If the Temp folder issues are caused by memory problems, they can be solved by using An administrative tool called Windows Memory DiagnosticIt is a comprehensive solution for installation problems, such as random freezing, blue screen of death errors, and application crashes.
- You can open it from the Windows search bar by searching for memory or by using the command Run and write mdsched.exe.
- The application is available in the list of administrative utilities of Windows.
- You will be prompted to restart your computer and you can do so immediately or schedule the memory diagnostic for the next restart.
- After the memory test is complete, your computer will restart, and a log file will be created, which will give you the source of any memory errors.
6. Clean reboot your Windows device
A clean reboot restarts your Windows machine with a minimal set of drivers and startup programs. This helps clear any background programs that interfere with normal Windows operations. Doing so will greatly help clear any errors in the temporary folder path.
- Using the Windows Run command, open Helping tool To configure the system by typing msconfig.
- Go to the tab Services As shown here to check the option “Hide all Microsoft services”.
- Once you have removed core Microsoft services from the image, you can choose to Disable all Or select some programs to disable.
- Restart Windows to apply the changes. Your computer will return to normal after removing the previous sources of the system error.
7. Reset the cloud
It usually works Better system recovery To enable access to the Windows Temp folder, however, if you are experiencing any uninstallation issues, it is recommended not to perform a System Restore, as this can lead to numerous crashes that continue to occur in an endless loop.
A cloud-based reset is the best way to go. It's safe and downloads the latest version of Windows.
- Go to Windows Recovery Options from “Settings -> System -> Recovery.”
- Click the button “Reset PC” , which will open a new pop-up window.
- If you can't access your computer's desktop screen because your computer won't complete the restart process, you can also access the option "Reset your computer" In Windows Safe Mode.
- Safe mode can be started using Windows boot keys during startup. These can vary from computer to computer, but include the following keys: F2 Or F6 Or F12 Or Del. (Check your laptop/PC manufacturer's website for exact data.)
- Locate "Keep my files" In the option to remove all apps and settings while keeping all your personal files.
- When asked how you want to reinstall Windows, choose the Cloud Download or Local Reinstall option instead.
- Keep your device connected and online at all times.
- Follow the rest of the on-screen instructions to reset your Windows device. This will involve a reboot.
The whole process takes several hours, maybe even up to a day, but you'll be greeted with a brand new Windows operating system when it's finished.
Frequently Asked Questions
Q1: How do I prevent NSIS errors?
answer. All NSIS errors can be traced back to a file installed on your Windows PC. To prevent NSIS errors, it's recommended that you run all installer files through the SmartScreen filter and Windows Security Scan.
Q2: What does “Error writing temporary file” mean?
Answer: “Error writing temporary file.” In Windows, it means there isn't enough space to write anything (add or remove information) to the Temp or Tmp folder locations. Depending on the source of the error, it could also mean that you don't have permission to write anything to the Temp folder.
Q3: Tmp files keep running when Windows starts. How can I fix this?
answer. Tmp files are an integral part of your Windows PC, but they can be easily removed. You can remove them by disabling them during startup. Therefore, you need to Control the Windows Startup folder.