how do i change windows default "temp" directory?

Boonesmi

Lifer
Feb 19, 2001
14,448
1
81
i have windows installed on c: drive, but i want windows to use d: drive (a second hard drive) for its "temp" directory,
i saw how to change "temp internet files" (basically im trying to make it so windows does little if no writing on the c: drive)

im guessing its just a simple reg change. any help much appreciated :)
 

Edman

Member
Nov 6, 2000
132
0
0
If it's win 9X what are u talking about, then just edit your autoexec.bat file something like mine:

SET windir=C:\WINDOWS
SET winbootdir=C:\WINDOWS
SET COMSPEC=C:\WINDOWS\COMMAND.COM
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;E:\AEDTOOLS
SET PROMPT=$p$g
SET TEMP=n:\TEMP
SET TMP=n:\TEMP

here you can see the change of the default temp directory to the "n" drive

If you are using the NT plataform then you must change the enviroment variables in the system propierties tab.

Hope it helps!!
 

Boonesmi

Lifer
Feb 19, 2001
14,448
1
81
silly me, of course i should have said its win98se

tks for the reply, but im curious, cant it be done in the registry, (the reason i ask is i dont even use an autoexec.bat, i just leave it empty, same with config.sys)

when i install programs windows writes to a temp file during the install process, then is supposed to clean it up, i just want to change it so it writes somewhere on the d: drive not c:


thanks again for your reply, any other help/info? anyone?
 

jaywallen

Golden Member
Sep 24, 2000
1,227
0
0
I'm afraid I can't help much on your primary question because I don't know much about Win9X, but I do suggest, even if you point the Temp environment variable to another drive / directory, that you leave a temp directory in place under C:\Windows. A lot of apps are hard-coded to go there. Many of them will fail gracefully or will re-create the directory if they need it, but some will fail miserably. For instance, some versions of Internet Explorer are hard-coded to write the temporary HTML file to THAT particular temp directory so that Notepad (or whatever editor you use) can open the file to fulfill the "View Source" command.

Regards,
Jim
 

jaywallen

Golden Member
Sep 24, 2000
1,227
0
0
It's under the Environment button on the Advanced tab in the System Properties dialog, I think. Egad! It's been so long since I've used NT4 that I'm having trouble remembering! There should be both USER environment variables and SYSTEM environment variables listed.