Have you ever encountered the error message “Make sure your temp folder is valid” when you install an application or restart your computer? This article from MiniTool gives you several useful ways to help you get rid of this error.

“Make sure your temp folder is valid” is a common NSIS error in Windows, and here you can see a true example from tenforums.com:

So, all of a sudden, a program or two will not run nor can I install a new version of CCleaner as well. I get a pop-up error message of "Error writing temporary file. Make sure your temp folder is valid" at each attempt to run or install CCleaner.

I am here because you guys know how to fix any Win 10 problems. So, I hope you can help me once again.

tenforums.com

Make sure your temp folder is valid

To fix this issue, you need to get some information about it including the common reasons why this error message appears.

What Is NSIS Error Writing Temporary File and Why It Occurs

In general, the “writing temporary file” NSIS error appears when you try to run an installer file, uninstall an application, and restart the computer. This message indicates that Windows cannot read or write inside the temp folder.

Nullsoft Scriptable Install System (NSIS) errors indicate that the .EXE file of an application has become corrupted for various reasons, thus, affecting the Windows Installer file and making it impossible to make changes to the application.

There are a variety of reasons why this error occurs, and here you can see the common causes for it.

  • The temporary file is corrupted.
  • A misconfiguration in the temp folder prevents you from accessing the temp folder.
  • Your computer is infected by viruses or there is malware in the PC.
  • The installer is pirated. An incorrect installer can also result in the error message “Make sure your temp folder is valid”.

How to Fix Make Sure Your Temp Folder Is Valid in Windows 10/11

After knowing what the “NSIS error writing temporary file” is, now you can see a couple of ways listed below to help you get rid of it.

Fix 1. Configure Temporary Files Permissions

When temporary folders are set to the read-only mode, you may receive an error message saying “Error writing temporary file. Make sure your temp folder is valid”. In this case, you need to disable the read-only mode and give your temp files permissions.

Step 1. Press Windows + E key combinations to open File Explorer.

Step 2. Navigate to this location: C:\Users\username\AppData\Local (Remember to replace the username with your actual username ).

Step 3. Find and right-click the Temp folder and select Properties .

Step 4. Under the Security tab, select your username and click Edit .

Step 5. Check Allow next to Full control and click OK to save all the changes.

allow full control

Step 6. Restart your computer to check whether the issue has been fixed.

Fix: Microsoft Word Opens Files in Read-Only Mode
Fix: Microsoft Word Opens Files in Read-Only Mode

How to fix the issue “Microsoft Word opens files in read-only mode”? This post shows you some practical methods.

Read More

Fix 2. Delete Temporary Files Manually

When there are too many temporary files and cached data in your computer, you may encounter the problem of “temp folder is not valid”. In this situation, you can delete temp files manually.

Step 1. Press Windows + R keyboard shortcuts to open Run.

Step 2. Type %temp% in the input box and press Enter .

Step 3. Press Ctrl + A key combinations to select all files. Then right-click them to select Delete .

delete temp files

Step 4. Reboot your device and check whether the NSIS error persists.

Fix 3. Re-Download and Install the Application

The pirated installer may contain malware that causes Windows to display the "Make sure your temp folder is valid" error. In this case, please re-download the application from the software's official website and try to install it again.

Tip: Windows Defender is a signature-based antimalware system that scans files, fixes threats, and lists detected threats in your organization's security report and Windows Security. It is recommended that you turn on Windows Defender to protect your system.

5 Ways to Fix Protection History Not Showing Issue
5 Ways to Fix Protection History Not Showing Issue

This article put forwards several ways to fix the “protection history not showing” issue in Windows 10/11.

Read More

Fix 4. Compress the Installer File

Some users reported that they successfully resolved the "Make sure your temp folder is valid" error message by compressing the .EXE file into a compressed folder. So, you can try this method by following the steps below.

Step 1. Open File Explorer. According to the name of the installation package, find the installer file that prompts the NSIS error by using the search tool in File Explorer .

Step 2. Right-click the .EXE file and select Send to > Compressed (zipped) folder .

compress the folder

Step 3. Open the zipped folder and launch the installer file again.

Fix 5. Run Windows Memory Diagnostic Tool

Failure to install applications can be caused by memory-related issues. At this point, you should run the Windows Memory Diagnostic tool to resolve the “NSIS error writing temporary file” issue. This tool scans your computer's physical memory and helps you identify possible errors.

Tip: Using the Windows Memory Diagnostic tool requires restarting your computer. So, you need to save any open documents before using this tool.