7 Methods to Fix “Make Sure Your Temp Folder Is Valid” NSIS Error

Spread the love

We normally don’t expect any trouble after double-clicking an installer file or uninstalling an app through a right-click. But sometimes a pop-up error message may show on our screen saying “Error writing temporary file. Make sure your 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 ensure that the installation file is malware-free? Use one of these reputable website links to download all official Windows software.

Content

What Is the “Make Sure Your Temp Folder Is Valid” NSIS Error?

NSIS (Nullsoft Scriptable Install System) errors are specific types of errors that affect Windows installers, indicating that their .EXE files are corrupted due to software changes, incomplete downloads, or viruses creeping in during the installation. Prominent NSIS errors include the error we’re discussing in this article and “Error launching installer.”

The Windows Temp folder plays an important role in installing or uninstalling any app/program, as it hosts all temporary files and cached data. If the Temp folder isn’t set correctly, or if there are any memory/malware issues, the user won’t have the permissions to read/write the .EXE files. This means they can’t modify it to finish an installation or uninstallation.

Under these conditions, whenever you double-click the .EXE setup file or right-click to uninstall in the Control Panel, a pop-up message shows stating this NSIS error: “Error writing temporary file. Make sure your Temp folder is valid.”

Even if you’re not dealing with installation issues, the annoying message may display after a PC restart and will keep refreshing on the screen once every few minutes. It doesn’t go away automatically.

To deal with the problem, you’ll need to regain ownership of the Temp folder and its path 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 in the Temp folder. They occupy a lot of disk space, and some of these files may be responsible for causing conflicts with the installer software.

  1. Open the Temp folder path with the Windows Run command, Win + R, then type %temp% .

  1. This will launch a new File Explorer window in Windows where all the temporary files are visible.
  2. Select the entire contents of the Temp folder using Ctrl + A and press the Delete button.

  1. Not all temporary files are deleted during a first attempt. You will need to keep pressing the “Try again” button until all of them are cleared.
  2. Once there is nothing left, refresh the Temp window and try to install/uninstall the app.

Tip: apart from the Temp folder, there are many other ways to clear the cache in Windows, such as Disk Cleanup, DNS Cache, setting up Storage Sense, and more.

2. Redownload the Program and Launch a New Installer

The “Make sure your temp folder is valid” error can occur if there is malware in the installer software. In such a case, it’s recommended to wait for some time and download the software again. Chances are the developers may have released the latest iteration of the software and that it took care of the pending issues.

If you have installed the older version, the newer installer will simply overwrite everything, and you can easily uninstall the new version later.

3. Run the Installation from a Created ZIP Folder

Here’s a neat workaround that will execute the installer in no time. While ZIP files can get corrupted during a download process, zipping the downloaded .EXE installer file is actually safer. It overwrites all of the installation information inside a zipped folder rather than your destination disk. When you run the installer within a compressed folder, it completely bypasses the error.

  1. Navigate to the folder where your installer file is located.
  2. In Windows 11, right-click to select the “Compress to ZIP file” option. Windows 10 users may be asked to select a compression software, such as WinRAR or WinZip.

  1. A zipped folder is created that includes all the installation files and dependencies.

  1. Navigate to the zipped folder path in Windows 11 and right-click to select “Open.” The installer will run from within the compressed folder. Windows 10 runs it from within the compressed folder software window.

Did you know you could open ZIP and RAR files easily in Google Drive? This is a good option for better compression and malware check using Google’s servers.

4. Configure Windows Folder Permissions to Disable Read-Only Access

This method should only be applied if you’re unable to locate the Temp folder in its assigned path traced using the environment variables. This would prevent you from making any changes in the Temp folder, thus creating problems installing or uninstalling software. Disabling “Read-only” access is the solution.

  1. Open System Properties from the Windows Run command by typing sysdm.cpl and hitting Enter.

  1. Navigate to the “Advanced” tab and open “Environment Variables” under Startup and Recovery.”

  1. Check the path for the “Temp” and “Tmp” variables and write them down somewhere.

  1. Navigate to the Temp folder path in the File Explorer window. If you can’t find it here, it means you don’t have permission to access the Temp folder.

  1. To correct the problem, first find where the Temp folder is located using %temp% in the Windows Run command.
  2. Go back to the environment variables window and edit Temp under “User variables” to point to the correct temp folder path. Don’t edit the “System variables,” as by default, it will point to “C:\Windows\Temp.”

  1. Go to “C:\Windows” and right-click on the Windows folder to open its properties.

  1. Go to the “General” tab. The “Read-only” attribute is enabled by default. Disable it and apply the changes.
  2. Repeat the same for other folders in Windows, such as “System32” and the “Temp” folder.
  3. Restart your computer and observe the changes.

Good to know: sometimes accessing relevant Windows folders can be tricky. For example, you have to try various ways to control the WindowsApps folder.

5. Check for Memory Issues Using Windows Memory Diagnostic

If the Temp folder issues are due to memory problems, they can be solved using an administrative tool called Windows Memory Diagnostic. It is a one-stop solution for installation issues, such as random freezes, blue screen of death errors, and crashing apps.

  1. You can open it from the Windows search bar by looking for memory or using the Run command and typing mdsched.exe.

  1. The app is available in a list of Windows administrative utilities.

  1. You will be asked to restart your PC and can do it right away or schedule the memory diagnosis for the next restart.

  1. After you finish the memory test, the PC will restart, and a log file will be generated, which will give you the source of any memory errors.

6. Clean Reboot Your Windows Device

A clean reboot restarts your Windows device with a minimum set of drivers and startup programs. This helps clean up any background programs that are interfering with normal Windows processes. Doing this would greatly help remove any errors in the temp folder path.

  1. Using the Windows Run command, open the System Configuration utility by typing msconfig.

  1. Navigate to the “Services” tab as shown here to check the option for “Hide all Microsoft services.”

  1. Once the essential Microsoft services are removed from the picture, you can choose “Disable all” or just check a few programs to disable them.
  2. Do a Windows restart to apply the changes. Your PC will be back after it removes the past sources of the system error.

7. Do a Cloud Reset

Normally a System Restore works best to enable access to the Windows Temp folder. But if you are having any uninstallation issues, it is highly recommended not to go for a System Restore, as it may lead to multiple crash errors which keep occurring in an infinite loop.

A cloud-based reset is the best way to go. It’s safe and downloads the latest Windows version.

  1. Go to Windows Recovery options from “Settings -> System -> Recovery.”
  2. Click the “Reset PC” button, which will open a new pop-up window.
  3. If you’re unable to access your PC desktop screen because your PC won’t complete the restart process, you can also access the “Reset PC” option in Windows Safe Mode.

  1. The Safe Mode can be launched using Windows boot keys during a start. They can vary from PC to PC but include F2, F6, F12, or Del keys. (Check the laptop/PC manufacturer’s website for the exact data.)
  2. Select “Keep my files” in the option to remove all apps and settings but keep all of your personal files.

  1. When asked how you would like to reinstall Windows, choose the cloud download option instead or local reinstall.
  2. Keep the device constantly plugged in and connected to the Internet.
  3. Follow the rest of the on-screen instructions to reset your Windows device. It will involve a restart.

The whole process takes several hours, possibly up to a day, but you will be greeted with a brand-new Windows operating system upon completion.

Tip: are you worried about what should happen if Windows fails to start? We have you covered with these expert tips.

Frequently Asked Questions

How do I prevent NSIS errors?

All NSIS errors can be traced back to an installer file in your Windows PC. To prevent NSIS errors, it’s recommended to run all installer files through a SmartScreen filter and Windows Security scanning.

What does “Error writing temporary file” mean?

“Error writing temporary file” in Windows means there isn’t enough space to write anything (add or remove information) from the Temp or Tmp folder locations. Depending on the error source, it can also mean you do not have permission to write anything in the Temp folder.

Tmp files keep starting up on Windows startup. How can I fix it?

Tmp files are integral to your Windows PC but easily disposable. You can remove them by disabling them during a startup. For that, you need to control the Windows Startup folder.

Image credit: Pexels. All screenshots by Sayak Boral.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.
By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time. Subscribe


Sayak Boral
Staff Writer

Sayak Boral is a technology writer with over eleven years of experience working in different industries including semiconductors, IoT, enterprise IT, telecommunications OSS/BSS, and network security. He has been writing for MakeTechEasier on a wide range of technical topics including Windows, Android, Internet, Hardware Guides, Browsers, Software Tools, and Product Reviews.

Comments are closed