Windows is a wonderful operating system and what makes it even more wonderful is the ability to install various kinds of apps. That said, many things could stop you from installing new apps. One such error is “Error writing temporary file, Make sure your temp folder is valid”. In this post, we’ll know more about this error and have a look at some effective ways in which you can fix the error quickly.
What Is “Error Writing Temporary File, Make Sure Your Temp Folder Is Valid”
It is an NSIS or Nullsoft Scriptable Install System error. It occurs when you try to uninstall an application, run an installer package or even restart your computer. As the error code states, when this issue occurs, Windows cannot read or write inside the temp folder. The error also indicates that the .EXE file of the application has become corrupt due to one or the other reason because of which the Windows Installer file is affected and no changes can be made to the application.
What Are The Reasons Behind “Error Writing Temporary File, Make Sure Your Temp Folder Is Valid”
There could be several reasons behind this issue such as –
- PC infected with malware. More specifically, the installer package consists of malicious files.
- Misconfigured temp folder.
- Temp files have become corrupted.
- The installer package is pirated.
Best Ways To Fix “Error Writing Temporary File, Make Sure Your Temp Folder Is Valid”
Solution No. 1 – Try Running Installer As Admin
If you are unable to install the application normally as you would, you can try installing it as an administrator. This step will give complete permission to the installer to run the application on your PC. To run the installer as admin, right-click on the installer and select Run as administrator
Solution No. 2 – Remove Temporary Files Manually
As we said that the error at hand could have occurred because of corrupt temporary files or if temporary files are taking up too much storage space. In either case, here is how you can simply get rid of temporary files on your Windows PC.
1. Open the Run dialog box by pressing Windows + R
2. When the run dialog box opens, type %temp%.
3. Press Enter.
4. When the temporary files open, select all and click on Shift + Delete
Here, we’d like to add that there are more than one ways todelete temporary files on Windows. And, while it is a hassle-free process, there are times when you might find yourself in a situation where you are unable to delete temp files. If that’s the case, this post will help you out.
Solution No. 3 – Configure Appropriate Permissions
In case the temp folder is set to read-only, Windows won’t be able to save files in it. You might be wondering why is that a problem. Windows creates temp files for all kinds of applications, even for ones that you try to install. For this, the temp folder needs full control. And, here’s how that can be established –
1. Open Windows Explorer by pressing the Windows + E keys.
2. Navigate to C:\Users\UserName\AppData\Local. Change the UserName with yours.
3. Right-click on the Temp folder and select Properties.
4. Click on the Security tab.
5. Select your username and click on the Edit button next to To change permissions, click Edit.
6. Click on the Allow checkbox next to Full Control.
7. Click on Apply and then, OK
8. Restart your computer.
Solution No. 4 – Restart Windows Installer Service
As an additional measure, you can also restart Windows Installer Service. Here is how you can enable or disable Windows Installer Service.
Solution No. 5 – Fix Memory-Related Issues
If you are unable to install new software and are constantly running into the “Make sure your temp folder is valid” error message, it could be that there are memory-related issues. To resolve these issues, you can use Windows Memory Diagnostic Tool as shown in this post.
Solution No. 6 – Use A Third-Party Optimizer Program
At this point, if you are still not able to fix the issue, you can bring into force a third-party tool like Advanced System Optimizer. The tool can help identify common issues and fix them as well. It also has a dedicated memory optimizer that can help optimize the unallocated system memory.
How To Use Advanced System Optimizer To Fix Common Issues?
1. Download, run, and install Advanced System Optimizer.
2. From the left-hand side, click on Smart PC Care.
3. Click on the blue-colored Start Scan from the bottom-right corner and wait for the scan to complete.
4. Once the scan is complete, Advanced System Optimizer will enlist issues and actions that you can take.
Solution No. 7 – Compress The Installer File
You can try compressing the installer file to get rid of the “Make sure your temp folder is valid” error message. More specifically, here you can compress the .EXE file. To do that follow the steps mentioned below –
1. Open File Explorer.
2. Find the problematic installer file.
3. Right-click on the .EXE file and choose Send to > Compressed (zipped) folder.
4. Launch the installer from the zipped folder.
Solution No. 8 – Reinstall The Program
You may also want to check the program for malware since it could be the case that the installer package consists of malware because of which you are repeatedly getting the message. Once you have ascertained that the application you want to download or even its files are not malware, uninstall the program completely, wait for some time, and reinstall the program.
Can You Now Install Programs?
We hope that after you have tried the measures above, you have been able to fix the “Make sure your temp folder is valid” error. For more such content, keep reading WeTheGeek. You can also find us on Facebook, Pinterest, YouTube, Instagram, and Twitter.
POCO, ACE, Loki и другие продвинутые C++ библиотеки
NullReferenced 13.05.2025
В C++ разработки существует такое обилие библиотек, что порой кажется, будто ты заблудился в дремучем лесу. И среди этого многообразия POCO (Portable Components) – как маяк для тех, кто ищет. . .
Паттерны проектирования GoF на C#
UnmanagedCoder 13.05.2025
Вы наверняка сталкивались с ситуациями, когда код разрастается до неприличных размеров, а его поддержка становится настоящим испытанием. Именно в такие моменты на помощь приходят паттерны Gang of. . .
Создаем CLI приложение на Python с Prompt Toolkit
py-thonny 13.05.2025
Современные командные интерфейсы давно перестали быть черно-белыми текстовыми программами, которые многие помнят по старым операционным системам. CLI сегодня – это мощные, интуитивные и даже. . .
Конвейеры ETL с Apache Airflow и Python
AI_Generated 13.05.2025
ETL-конвейеры – это набор процессов, отвечающих за извлечение данных из различных источников (Extract), их преобразование в нужный формат (Transform) и загрузку в целевое хранилище (Load). . . .
Выполнение асинхронных задач в Python с asyncio
py-thonny 12.05.2025
Современный мир программирования похож на оживлённый мегаполис – тысячи процессов одновременно требуют внимания, ресурсов и времени. В этих джунглях операций возникают ситуации, когда программа. . .
Работа с gRPC сервисами на C#
UnmanagedCoder 12.05.2025
gRPC (Google Remote Procedure Call) — открытый высокопроизводительный RPC-фреймворк, изначально разработанный компанией Google. Он отличается от традиционых REST-сервисов как минимум тем, что. . .
CQRS (Command Query Responsibility Segregation) на Java
Javaican 12.05.2025
CQRS — Command Query Responsibility Segregation, или разделение ответственности команд и запросов. Суть этого архитектурного паттерна проста: операции чтения данных (запросы) отделяются от операций. . .
Шаблоны и приёмы реализации DDD на C#
stackOverflow 12.05.2025
Когда я впервые погрузился в мир Domain-Driven Design, мне показалось, что это очередная модная методология, которая скоро канет в лету. Однако годы практики убедили меня в обратном. DDD — не просто. . .
Исследование рантаймов контейнеров Docker, containerd и rkt
Mr. Docker 11.05.2025
Когда мы говорим о контейнерных рантаймах, мы обсуждаем программные компоненты, отвечающие за исполнение контейнеризованных приложений. Это тот слой, который берет образ контейнера и превращает его в. . .
Micronaut и GraalVM — будущее микросервисов на Java?
Javaican 11.05.2025
Облачные вычисления безжалостно обнажили ахиллесову пяту Java — прожорливость к ресурсам и медлительный старт приложений. Традиционные фреймворки, годами радовавшие корпоративных разработчиков своей. . .
Error writing a temporary file, Make sure your temp folder is valid indicates that there is a problem with the folder Windows uses to store temporary files. This error can result from several reasons, such as the temporary folder being set in a different location, being deleted, or the user account in Windows lacking permissions.
There are several fixes mentioned below. Let’s dive into the solutions and fix this error.
1. Run the installer as an admin.
If the installer does not have administrator permissions, it will not be able to access the temporary files folder, resulting in the following error. To fix this issue, it is recommended to run the installer as an administrator. Follow these steps:
- Right-click on the installer file.
- Now, left-click on “Run as Administrator.
Run as administrator - A dialogue box will appear with Yes and No options; click Yes.
Run as administrator window
If you are on a user account, please refer to the administrator of your computer to help you resolve this issue.
2. Clean temporary files.
If there is no space left on the disk where the temporary files folder is located, you will encounter the following error. In this case, it is recommended to clean up your temporary files folder to make space for new temporary files. Follow these steps to clear your temporary files folder:
- Press the Windows key + R to launch the Run dialog.
- Type %temp% and hit Enter.
Running temp command in run - Click Ctrl + A to select all items.
- Then, click Delete or press Ctrl+Delete to delete all files at once.
It’s okay if some files are unable to be deleted; it happens when those temporary files are being used by a process. They will be deleted eventually when the program is done using them.
3. Restart the Windows Installer service.
The Installer service assists with the installation and removal of software in Windows. This service may occasionally experience problems or stop functioning, which can interfere with the installation or removal of programs. Setting the parameters of this service back to default may fix it, enabling you to install the desired program.
- Open the Run dialog by pressing Win + R on the keyboard.
- Type “services.msc” in the dialog box.
Restarting windows installer - In the services tab, Scroll down and find “Windows Installer”
Restarting windows installer - Right-Click on Windows Installer and select the “Restart” button from the context menu.
Restarting windows installer
Check to see whether the error is fixed.
4. Change the path of the Temp folder.
Some locations in Windows have very restricted access; only certain services and programs that Windows allows can access these locations, while an average user account cannot. In this case, we will define a new temporary files location for all the temporary files, allowing Windows to direct the program installer to this new location, which is much less restrictive than the normal temporary files location. Please follow these steps:
- Locate the C Drive.
- Now, Right-Click and create a folder.
Creating folder in C Drive - Press Win + I to launch the Settings tab and Navigate to System.
Opening Windows Settings - Then, go to ‘About‘.
- Click on Advanced System Settings, which is under the device’s specifications.
Going to Advanced Settings - Then, click on Environmental Variables.
Opening Environment Variables - Double-click on the TMP variable.
Clicking TMP variable - The existing location or variable value would be
%USERPROFILE%\AppData\Local\Temp
- Change this variable to the location where you created the folder; in this case, that would be:
C:\Temp
Click on “OK.
Changing the Variable value - Now, close all the windows and restart your computer.
Check to see if the issue persists.
5. Disable Windows Defender.
Windows Defender can sometimes block the installer from accessing the temporary files folder. This is done in order to protect your computer and prevent unnecessary access to vulnerable files in Windows. However, if you trust the installer of the program, you can temporarily disable Windows Defender to allow the installer to install the program. Follow these steps:
- IIn the Windows Search bar, enter “Windows Security.
Disabling windows defender - Click on Virus & Threat Protection from the sidebar menu.
Disabling windows defender - Now, select “Manage Settings” under this section.
Disabling windows defender - Then, go to Toggle Off Real-time Protection.
Disabling windows defender - Restart your computer.
Now, check your installer by running it in administrative mode. Your error will be gone, and you can install any file you want while running it on your computer.
Kevin Arrows
Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.
Readers help support Windows Report. We may get a commission if you buy through our links.
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
Windows PCs store temporary data created by Windows or programs running on your computer in temporary files. Temporarily files (tmp or temp files) hold data while a permanent file is writing. They are stored in the Temp folder.
However, issues with the above process may result in the Make sure your temp folder is valid or Your temp folder must allow execution errors.
Why do I get the Make sure your temp folder is valid error?
Getting the error message Error writing temporary file: Make sure your temp folder is valid on your computer indicates that the Temporary folder can’t store the related data when it adjusts the registry. Some notable causes of the error are:
- Corrupt temp files – Temporary files can corrupt the temp folder, causing issues with its activities.
- Malware and viruses – Malware and virus infection can cause a temp folder error when running an installer file or uninstalling an app. Also, it may corrupt system files on your computer.
- Wrong configuration in the Temp folder – Wrong configuration in the temp folder can cause problems storing related data as it writes the registry.
- NSIS error – The error writing temporary file make sure temp folder is valid may come from an improper installer and it also appears as error writing temporary file NSIS.
Now that we know what causes this error, we’ll discuss ways to fix it and get your temp folder working again.
How can I fix the Make sure your temp folder is valid error?
Before trying any advanced troubleshooting steps, go through the following preliminary checks:
- Turn off background apps running on your PC.
- Restart Windows in Safe Mode and check if the error persists.
If these preliminary steps don’t fix the error, proceed with the following solutions.
1. Delete the temporary folder files
- Press Windows + R keys to open the Run window, type %temp% in the search space, and press Enter.
- Press Ctrl + A and right-click, then click on Delete from the drop-down.
- Navigate to the following path:
This PC\Local Disk (C):\Windows\Temp
- Press Ctrl + A and delete all the temp files.
- Restart the PC and check if the Temp folder error persists.
Deleting temp files on your PC will clear the corrupt files liable to cause the NSIS error writing temporary files. You can check our article about how to delete Temporary files on Windows 11 for more steps.
2. Perform a clean boot
- Press Windows + R key to open the Run dialog box, type msconfig, and click OK.
- Select the Services tab and check the box for the Hide all Microsoft services option, then click the Disable all button.
- Go to the Startup tab and click Open Task Manager.
- Select the startup programs and tap the Disable button.
- Restart your PC and check if the temp folder error persists.
A clean boot prevents startup from running programs liable to cause the error from running when you start the system.
- Recent Windows 11 update lets you disable profanity filter in voice typing
- Meta under fire after AI chatbot caught having sexual talks with minors
- OpenAI decides to reverse recent GPT-4o update after user find bot being overly appeasing
- Microsoft’s hotpatching for Windows Server 2025 to be subscription-based starting July
- South Korea’s antitrust watchdog green lights Microsoft’s practice of bundling Copilot
3. Run the chkdsk command
- Left-click the Start button, type command prompt, and click the Run as administrator option.
- Click Yes on the User Account Control prompt.
- Type the following commands and press Enter:
chkdsk C: /r
- Restart your PC.
Running the chkdsk command examines disk space and disk use. Also, it provides a status report specific to each file system and shows the errors found in the system file.
Check our guide on what to do if Command Prompt keeps crashing on your PC to fix it if you run into trouble.
4. Compress the installer file prompting the error
- Press the Windows + E key to open File Explorer.
- Navigate to the Downloads folder and find the installer file prompting the error.
- Right-click on the installer file and click on Send from the drop-down. Click on the Compressed (Ziped) folder option to zip the installer file inside a folder.
- Open the zipped folder and double-click the installer file to start the installation process.
The above steps should run the installer without any errors. Compressing the installer file prevents interference from other files.
Alternatively, you can read our guide about Temporary files and their functionality on Windows PCs.
In addition, you may check our guide about Temporary files not deleting and learn how to delete them on Windows 11. To learn more about temp folders, check our SquirrelTemp folder guide.
Also, we recommend you check what to do if you encounter you need administrator permission to delete the folder error on your PC.
In conclusion, if you have further questions or suggestions on what to do if you encounter the error: make sure your Temp folder is valid; kindly drop them in the comments section.
Henderson Jayden Harper
Windows Software Expert
Passionate about technology, Crypto, software, Windows, and everything computer-related, he spends most of his time developing new skills and learning more about the tech world.
He also enjoys gaming, writing, walking his dog, and reading and learning about new cultures. He also enjoys spending private time connecting with nature.
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
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.
Step 6. Restart your computer to check whether the issue has been fixed.
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.
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.
Tips:
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.
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.
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.
Tips:
Tip: Using the Windows Memory Diagnostic tool requires restarting your computer. So, you need to save any open documents before using this tool.
The steps to launch the Windows Memory Diagnostic tool to troubleshoot your computer are very simple.
Step 1. Type Windows Memory Diagnostic in the Windows search box and click it from the best match result.
Step 2. In the pop-up window, choose Restart now and check for problems (recommended) or Check for problems the next time I start my computer based on your needs.
Fix 6. Perform a Clean Boot
Many Windows problems are likely to be caused by third-party application blocking. And performing a clean boot will start your device with a minimal number of drivers and startup applications, so you will know if the problem of “Make sure you temp folder is valid” is due to a third-party application. If yes, you can uninstall the corresponding program to get rid of the error.
Here you can see how to perform a clean boot.
Tips:
Tip: Clean Boot is for troubleshooting only and will never delete your files and programs.
Step 1. Press Windows + R key combinations and type msconfig in the text box. Then press Enter.
Step 2. Check Hide all Microsoft services first and then click Disable all.
Step 3. Go to the Startup section and click Open Task Manager.
Step 4. Select the application you want to disable and click Disable. Then repeat the steps to disable multiple applications.
Step 5. Restart your computer to ensure the “Make sure your temp folder is valid” error has been addressed.
Fix 7. Reset the Computer
If all the methods listed above do not work, you may need to factory reset your computer to fix the NSIS error.
Note:
Note: In the factory reset process, you can choose to keep your files or remove them. In case of wrong operations, it is recommended that you use the free data backup software to back up your files in advance.
Here you can follow the steps below to reset your PC.
Step 1. Press Windows + I key combinations to open Windows Settings.
Step 2. Click Update & Security > Recovery. Then click Get started under Reset this PC.
Step 3. In the pop-up window, choose the corresponding option to keep your files or not.
Step 4. Follow the instructions on the screen to complete the process. And check whether the NSIS error still exists.
How to Recover Deleted Windows Temporary Files
I believe you have fixed the “Make sure your temp folder is valid” error by applying the methods above. Now I am going to talk about how to recover deleted Windows temporary files. Because you may mistakenly delete needed temp files in Fix 2 and lots of users are troubled by recovering deleted temp files, and this is a true example:
How to restore an accidentally deleted temporary installation folder? I can tell that I accidentally deleted the temporary installation folder. So where shall I put it and should it have specific permissions? Oh, and what was it named?
answers.microsoft.com
You can use MiniTool Power Data Recovery, the best data recovery software, to recover your deleted temp files. This software is recommended due to its secure data recovery services.
This software supports recovering various kinds of files including pictures, videos, audio, documents, etc. from internal hard drives, external hard drives, SSDs, SD cards, USB flash drives, and more. You can run it on Windows 11/10/8/7.
You can first try MiniTool Power Data Recovery Free Edition to scan the target drive and see if it can find the temp files you want to recover. You can also use this freeware to recover 1GB of files.
Step 1. Download, install, and launch MiniTool Power Data Recovery to get its main interface.
MiniTool Power Data Recovery FreeClick to Download100%Clean & Safe
Step 2. Under the Logical Drives tab, select the target partition containing the files you want to scan and recover (Here we take the C drive for example because the default location path of the Windows temp folder is C:\Users\username\AppData\Local). Then click Scan.
Wait for the scan process to complete (recommended). Then you can filter found files by file type, file category, file size, and date modified. At the same time, you can also make use of the Search feature to locate your needed files by name if you know part of or the whole file name of your files.
Step 3. Preview and select all needed files and click the Save button to restore them in a safe place (Do not store them in the original path in case of data overwriting).
Now you can see the recovered Windows temp files in the location path you chose.
Tips:
Tip: MiniTool Power Data Recovery Free Edition can help you recover 1GB of data for free. To recover unlimited files, you are suggested to upgrade to the Professional edition. By the way, you can use the Professional edition to recover files when the PC won’t boot.
Hi! With MiniTool Power Data Recovery, I effectively rescued my Windows temporary folders. It is a good data recovery software worth trying. Click to Tweet
Wrapping Things Up
In a word, this post talks about how to get rid of the error message “Make sure your temp folder is valid” and how to recover deleted Windows temporary files using free file recovery software – MiniTool Power Data Recovery. Hope you can resolve the issue or recover deleted files successfully.
If you have any questions or suggestions when using MiniTool Power Data Recovery, please feel free to leave your comments in the comment area below, or you can send emails to [email protected]. We will deal with them as soon as possible.
NSIS Error Writing Temporary File FAQ
Where is the Windows temporary folder stored?
Windows temp folder is stored in this location typically: C:\Users\username\AppData\Local.
Is it safe to delete Windows temp files?
Generally speaking, all files in the temporary folder are only locations to hold information temporarily. So, they can be safely deleted. If you want to restore them, you can try using MiniTool Power Data Recovery Free Edition to get them back.
Will a clean boot delete my files?
A clean boot of a PC or Mac is simply a way to boot into Windows with only the necessary drivers and startup applications. It helps troubleshoot problems installing, launching, or accessing game content. Your files and applications will not be deleted.