How to Change Default Location of Temporary Files Folder in Vista, Windows 7, and Windows 8
Information
Temporary files are files that are stored and used in the system and/or user TEMP and TMP folders temporarily while a task is being performed.
Temporary files can be created while, for example:
This tutorial will show you how to change the default location of the TEMP files folder to any local drive location you like in Vista, Windows 7, and Windows 8.
Temporary files can be created while, for example:
- Installing programs, drivers, etc....
- Created by Windows during normal usage when there may not be enough memory allocated for the task.
This tutorial will show you how to change the default location of the TEMP files folder to any local drive location you like in Vista, Windows 7, and Windows 8.
Note
System temporary files used by Windows are stored in the single hidden folder below by default.
- %systemdrive%\Windows\Temp
- %userprofile%\AppData\Local\Temp
Warning
You do not want to have all users share the same TEMP folder for security reasons.
You also do not want the system and users to share the same TEMP folder.
You also do not want the system and users to share the same TEMP folder.
OPTION ONE
To Change Windows TEMP Folder Location in Environment Variables
1. If you have not already, create new separate Temp folders at the location you like to be used as the new user (ex: F:\Temp) and system (ex: F:\System\Temp) TEMP folders.
NOTE: You will need these folders in steps 7 and 8 below.
2. If you are signed in as a standard user, then press the Windows + R keys to open the Run dialog, copy and paste the command below, press Enter, and go to step 7 below.
rundll32 sysdm.cpl,EditEnvironmentVariables
3. If you are signed in as an administrator, then open the Control Panel (icons view), click/tap on the System icon, close the Control Panel, and go to step 4 below.
4. Click/tap on the Advanced system settings link on the left side. (see screenshot below)
5. If prompted by UAC, then click/tap on Yes (Windows 7/8) or Continue (Vista).
6. In the Advanced tab, click/tap on the Environmental Variables button, and do either or both steps 6 and 7 below for what you would like to do. (see screenshot below)
7. To Change "User" TEMP Folder Location
NOTE: This will only change the user TEMP folder location for your user account.
A) At the top under "User variables for (user-name)", select the TEMP variable, and click/tap on Edit. (see screenshot below)
B) In only the Variable value field, type in the full path (ex: F:\Temp) of the user temp folder you created in step 1 above, and click/tap on OK. (see screenshot below)
C) Repeat steps 7A and 7B above for the TMP variable.
8. To Change "System" TEMP Folder Location
NOTE: You must be signed in as an administrator to be able to do this step. This will change the system TEMP folder location for the Windows operating system.
A) Under "System variables", scroll down a bit, select the TEMP variable, and click/tap on Edit. (see screenshot below)
B) In only the Variable value field, type in the full path (ex: F:\System\Temp) of the system temp folder you created in step 1 above, and click/tap on OK. (see screenshot below)
C) Repeat steps 8A and 8B above for the TMP variable.
9. Click/tap on OK. (see screenshot below step 7A or 8A)
10. If administrator, click/tap on OK. (see screenshot below step 6)
11. Restart the PC to apply.
OPTION TWO
To Change Windows TEMP Folder Location in Registry Editor
NOTE: Standard users will only be able to change their user TEMP folder location using this option. Administrators will be able to change both their user TEMP folder location and the Windows system TEMP folder location using this option.
1. If you have not already, create new separate Temp folders at the location you like to be used as the new user (ex: F:\Temp) and system (ex: F:\System\Temp) TEMP folders.
NOTE: You will need these folders in steps 5 and 6 below.
2. Press the Windows + R keys to open the Run dialog, type regedit, and press Enter.
3. If prompted by UAC, then click/tap on Yes (Windows 7/8) or Continue (Vista).
4. Do either or both steps 5 and 6 below for what you would like or able to do.
5. To Change "User" TEMP Folder Location
NOTE: This will only change the user TEMP folder location for your user account.
A) In regedit, navigate to the location below. (see screenshot below)
HKEY_CURRENT_USER\Environment
B) In the right pane of Environment, double click/tap on TEMP to modify it. (see screenshot above)
C) Type in the full path (ex: F:\Temp) of the user temp folder you created in step 1 above, and click/tap on OK. (see screenshot below)
D) Repeat steps 5B and 5C above for the TMP expandable string value.
6. To Change "System" TEMP Folder Location
NOTE: You must be signed in as an administrator to be able to do this step. This will change the system TEMP folder location for the Windows operating system.
A) In regedit, navigate to the location below. (see screenshot below)
Code:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
B) In the right pane of Environment, double click/tap on TEMP to modify it. (see screenshot above)
C) Type in the full path (ex: F:\System\Temp) of the system temp folder you created in step 1 above, and click/tap on OK. (see screenshot below)
D) Repeat steps 6B and 6C above for the TMP expandable string value.
7. When finished, close Registry Editor.
8. Restart the PC to apply.
That's it,
Shawn
Attachments
Last edited by a moderator: