Share via

Change location of TEMP files folder to another drive

Anonymous
2010-03-21T02:43:39+00:00
  1. What are the steps (dialogue) to change Windows7 system TEMP files on C-drive to one of my other local HHD drives? I now have only a 160GB SSD for my boot (C-drv) and want to keep the WRITE/ERASE ops down to a minimum.
  2. Is it a security risk to change the Internet TEMP file Folder from the hidden/protected area on the C-drive to another local HHD? I have read that there are built-in virtual paths and protectors both on the system and registry which tends to protect from internet TEMP files contains viruses, rootkits, etc from reaching the critical areas easily. Also Norton likely checks signatures in these default areas for TEMP files.

Thanks in advance.


Core i7-975 3.33GHz, 12GB RAM, nVidia GTX280m, Win7 Ultimate64

Windows for home | Previous Windows versions | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
  1. Anonymous
    2010-03-22T01:48:26+00:00

    Hi Mike,

    To change the location of the System Temp folder, follow the steps given below.

    1.       Right click on Computer and click on Properties. In the resulting window with the basic information about your computer

    2.       Click on Advanced system settings on the left panel resulting in a dialog box click on the Advanced tab a

    3.       Click on the button near the bottom labeled Environment Variables.

    4.       You may see both TMP and TEMP listed in the section labeled User variables for (account). That's the common location; each different login account is assigned its own temporary location.

    5.       In the Variable value Edit box you may specify the path to the directory that Windows and many other programs will use for temporary files.

    Be sure and repeat that process for both TMP and TEMP.

    You'll need to restart any running programs for the new value to take effect. In fact, you'll need to restart Windows for it to begin using the new value for its own temporary files.

    To change the location of the Internet Temp folder, follow the steps given below.

    Note: That Internet Explorer moves cookies to the new folder and the old folder is removed. Additionally, the following message is displayed when you attempt to move the Temporary Internet Files folder:

    Warning: Moving the location of your Temporary Internet Files folder will delete all your subscription data.

    1. Create a new folder to store the files. For example, if you want to store the files in a folder named Ietemp on drive D, create the following folder:

    D:\Ietemp

    For information about how to create a folder, click Start, click Help, click the Index tab, type new folder, and then double-click the "New Folders" topic.

    1. Start Internet Explorer.
    2. On the Tools menu, click Internet Options.
    3. On the General tab, click Settings.
    4. Click Move Folder.
    5. Click the folder you created in Step 1.
    6. Click OK, click OK, and then click OK again.
    7. Restart your computer

    You can change the location of Internet explorer temp folder; there is no security threat to your computer.

    Hope this information is helpful.

    Amrita M

    Microsoft Answers Support Engineer

    Visit our Microsoft Answers Feedback Forum and let us know what you think.

    200+ people found this answer helpful.
    0 comments No comments

25 additional answers

Sort by: Most helpful
  1. Anonymous
    2014-10-05T19:00:13+00:00

    I did it, but msi installers stopped to work with "Internal Error 2203".

    I've read about it here: http://support.microsoft.com/kb/296056

    So, any idea how to move C:\Windows\Temp to another partition (or disk) without breaking msi installers?

    Replying for the benefit of anyone finding this via google like I did. I changed the TEMP folder to another drive on Windows 8.1 64 bit and also found that Installers broke. It turns out that the problem is that services started by SYSTEM (such as the windows installer service) can't access the new temp folder. I checked the Security pane in the folder's Properties and SYSTEM already had full access, but it still didn't work. Turns out I needed to change the folder's Owner to SYSTEM:

    To fix this issue:

     - Create a new folder to use as the Temp folder

     - Open the new temp folder's Properties window

     - Open the Security tab

     - Click the "Advanced" button at the bottom

     - At the top of the advanced screen, it should specify the Owner of the folder. Click the word "Change" next to that.

     - Change the owner of the folder to System. Click OK to save the changes.

     - Change your %TMP% and %TEMP% environment variables to the new folder using the normal instructions.

    Installers immediately started working again, and I've had no problems so far. Hopefully this works for more people!

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2012-12-11T00:30:44+00:00

    Hi Everyone:

        I'm replying because I got an email from this thread. I have found an answer that makes me happy and thought I'd share it with all of you.

        I've noticed the common theme to the users for this question is the SSD as a System Drive scenario. I have a SSD with a clean install. I have my original hard drive as my data drive. By the time I got done with my trial and errror, I found that from the Welcome screen (when it asks you for a user name for the first time) when Windows first boots up I press Ctrl+Shift+F3. It reboots into Audit mode. If you are prompted to install any OEM softare from your brand of computer, do it now and don't forget to change the drive letter for any installation destinations. Then go in the registry and go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. Here change the C: Drive letter to your other drive letter to all values but not the Default Profile. This Default appears to be just a template for any new users to the machine. There's minimal rewrite on the SSD plus things get weird if you change the Default Profile value. Before I get to far, hopefully, you have your other hard drive in your machine all ready. Add a Windows\Temp folder to the Other hard drive and then change the TMP and TEMP variable values to "yourdrive:\Windows\Temp" This is pretty much as good as it gets with an SSD at this point. Now restart in OOBE. Enter your User name and reclaim your computer. You may notice some start menu items aren't listed under programs. In this case, right click Start/Programs to go to that location. Pin that window to the right of your screen. Now go to the "equivalent" folder under either C:\Users\Default(hidden) and/or C:\ProgramData(hidden). Pin that window to the left side of the screen. Now copy the shortcuts from the left side to the right side. Now your Programs will be listed under the start menu.  You may need to do a similar procedure for Administrative tools in the control panel if your missing shotcuts there. Now if your have icons that just don't work for programs you know your installed such as Office or Norton or whatever, it's probably because you didn't install them during the initial setup during Audit Mode. I had to redo my clean install and play along with the manufactorer's routine and things worked out. Also, don't forget to move your page file to your other drive as well. This really helps with performance as well as eliminates rewrites there as well. Windows turns off Hibernation on an SSD by itself it seems. I don't think there is a layman way to move all Program files to the other drive or eliminate SSD rewrites all together. I have a 256GB SSD for my System, recovery and C drive. It would be a long time before this fills up even if I get bad sectors here and there on the SSD. This scenario moved most, if not all of my working folders to my other drive. Then I updated my browser and the Temp internet files are there too.  Hopes this helps someone out there.

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2017-08-11T03:28:11+00:00

    Say No To Norton! = Good Advice

    (should be common knowledge by now those security suites are laughable)

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2012-07-01T02:26:14+00:00

    I set System environment variables

    TEMP C:\TEMP

    TMP    %TEMP%

    I do not have them as user variables.

    I rebooted my machine and checked system properties. that they had been retained.

    Then I opened a Command prompt and typed the Set command which reveals:

    TEMP=C:\Users\Perduta\AppData\Local\Temp

    TMP=C:\Users\Perduta\AppData\Local\Temp

    Conclusion:

    The answer given here is incorrect.

    1 person found this answer helpful.
    0 comments No comments