Moving C:\WINDOWS\TEMP to D:

There are 2 TEMP directories on my C: drive: 1) C:\TEMP and 2) C:\WINDOWS\TEMP.  The first one is apparently used by older (WIN3.1 & DOS) applications, while the second is apparently used by new 32-bit apps.

I know how to move the first one to D: (change the SET TEMP environment variable in AUTOEXEC.BAT).  However, this does not move the second one.  So, how do I move the second one?  I've looked all through the registry and cannot find a reference to it.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You need to set the tmp and temp variable in autoxec.bat.  ie

set temp=d:\temp
set tmp=d:\tmp

This is leftover from Win3.1x

One other thing you should do if you want all temp files on drive D: is to set up your virtual memory yourself, instead of letting Win95 take care of it for you.
Sorry, that should have been
set temp=d:\temp
set tmp=d:\temp   <--- Not set tmp=d:\tmp

mcsummationAuthor Commented:
Wrong!  The TEMP & TMP variables do NOT point to C:\WINDOWS\TEMP.  Something else does and it's this "other thing" that I'm trying to locate.  Please note that I put into the original question that I'd already done what you suggested.
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

Sorry, all I saw in the original question was the temp variable, not the tmp variable, which are two separate variables, and both DO need to be specified.  Good luck.
To make C:\WINDOWS\TEMP FUNCTIONAL on your D drive you'd have to load windows on D.

You can of course create a D:\WINDOWS\TEMP and point your set= to that directory.
Do You use F4 to doubleboot to DOS 6.2. If so then edit also in the file autoexec.dos those lines SET TEMP=... It is also possible that the C:\TEMP\ -driectory is leftover from earlier operating system. Try to remove it.
mcsummationAuthor Commented:
This is a preload system.  I just want to move the directory.

The answer from Smeebud was right, but maybe you need to understand why.

The immediate answer to your question is:
NO, you can't move it.

The reason:
When windows get's installed it created all the needed directories, amongst them in the one brought here in your question (C:\Windows\temp).  As long as windows resides on the C drive, that directory SHOULD remain on the same drive.
Even if you move it, it will not work, it will still point to that path (sometimes have seen it create a new one).

Miscrosoft Knowledge Base has addressed that issue and clearly explained that the only way to move that directory to another drive is to REINSTALL Windows onto that new drive.  There is no other options.

Now if you would like me to point to that Microsoft Articles, I'll be delighted.

As for the other problem that you have Windows preloaded on your system.  Well that's fine, normally the installation disks are somewhere on your hard drive.  You could create floppy disk from that directory as long as you have the formatter utility that will use the 1.68 format capacity, then reinstall windows using these disks.  There is other alternatives but will all depend on what's gona be your next move. (what do you wana do?)

Hope this explaination helped, if you need more info please ask

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It is true that, when Windows install itself, the temp directory is set to "c:\windows\temp\". However, you can manually change this in the registry. You will find the line "c:\windows\temp\" in the folder InstallLocationsMRU of HKEY_CURRENT_USER. If you had Win3.1 on your computer, you will also find the line "c:\temp" in the same place of the registry. You can modify it to "d:\temp\" and "d:\windows\temp" if you want. Once you do this, it will also change the lines in the folder HKEY_USERS as well.
Is this what you're looking for?


Yes, it's true you could change it manualy BUT.. it won't do it.. It will still read the C:\windows\temp even after the modification.

It's firm and confirmed.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.