Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set TEMP variable in login script

Status
Not open for further replies.

dyeats

IS-IT--Management
Jul 8, 2002
14
0
0
US
I am trying to set the TEMP and TMP environment variables via a login script. I neeed to reset the temp location so I can clean out the temp directory with one login script for all users, due to a meesy application that leaves a lot of junk there.

I have tried:

SET TEMP=C:\Temp
SET TMP=C:\Temp

But it doesn't seem to work.
Does anyone know how to do this?
 
Have you tried erasing the temp folders from the login script?

Like:

DEL /F /Q /S %TEMP%\*.*
DEL /F /Q /S %TMP%\*.*

This should erase the temp folders. The switches are:
/F: Force deletion of readonly files
/Q: Quiet mode
/S: Delete subdirectories as well.

I don't think you need to change the environment variables themselves.

Daniel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top