Share via

I keep getting errors that temp directory can't be created/found. I might have accidentaly moved or changed directory permissions (rwx, read, right, execute). Can I reset temp to the default?

Sara Gerstl 0 Reputation points
2025-07-18T17:29:13.5+00:00

I keep getting errors that temp directory cant be created/found. I might have accidentally moved or changed directory permissions (RWX, read, right, execute). Can I reset temp to the default that was set up on the Windows 11 pro laptop?

Does it matter the user? I have full admin rights with my user.

Windows for home | Windows 11 | Files, folders, and storage
0 comments No comments

1 answer

Sort by: Most helpful
  1. Ian-T 7,745 Reputation points Microsoft External Staff Moderator
    2025-07-19T03:56:45.6666667+00:00

    Hello, Sara Gerstl

     

    Welcome to Microsoft Q&A

     

    Thank you for your feedback. I have read your description of the issue and understand the frustration it is causing you.

     

    This issue is almost always caused by the temporary folder (Temp Folder) being incorrectly moved or its permissions being corrupted. You mentioned whether the user account is important—it is very important! Because the temporary folder settings are associated with a specific user account (and the system itself).

     

    I recommend trying the following methods to resolve this issue. The detailed steps are as follows:

     

    Step 1: Reset environment variables via the graphical interface

     

    In the search box of the Start menu, type “View advanced system settings” and open it.

    Alternatively, right-click “This PC,” select “Properties,” and then click “Advanced system settings.”

    In the “System Properties” window, under the ‘Advanced’ tab, click the “Environment Variables...” button at the bottom right.

    In the upper part of the “Environment Variables” window that appears, you will see “[Your username]'s user variables.”

     

    Locate the variable named TEMP, select it, and then click “Edit.”  

    In the “Variable value” input box, modify it to: %USERPROFILE%\AppData\Local\Temp  

    Click “OK.”  

    Similarly, locate the variable named TMP and also modify its “Variable value” to: %USERPROFILE%\AppData\Local\Temp  

    Click “OK.”

     

    In the lower half of the window, you will see “System Variables.”  

    Locate the variables named TEMP and TMP.  

    Ensure that their “Variable Value” is set to: %SystemRoot%\TEMP (or C:\Windows\TEMP)  

    If not, modify it correctly.

     

    Click the “OK” button on all open windows to save the changes.  

    Be sure to restart your computer for the new environment variable settings to take full effect.  

     

    Step 2: After restarting your computer, you need to ensure that these default temporary folders actually exist and that your account has full control over them.  

     

    Open File Explorer, enter %localappdata% in the address bar, and press Enter.

    Check if there is a folder named Temp here. If it does not exist, create one manually.  

    Right-click on the Temp folder, select “Properties” -> “Security” tab.  

    Click “Advanced.” Ensure that your user account and the SYSTEM account both have “Full Control” permissions for this folder. If not, grant permissions via ‘Add’ or “Edit.”

     

    Navigate to C:\Windows.  

    Check if there is a folder named Temp. If it does not exist, create one manually.  

    Similarly, check and ensure that your user account, SYSTEM, and Administrators group all have Full Control permissions for the C:\Windows\Temp folder.

     

     

    Best regards,  

    Ian | Microsoft Q&A Support Specialist

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.