TEMP and TMP Environment Variables DELETING

S

Scott.A.Smith

My TEMP and TMP environment variables were set to %USERPROFILE%\Local
Settings\Temp.

Since I am the only user of the system, I changed these to
%SystemRoot%\Temp throughout my registry.

Here's my question: Since I have redirected temporary files to
%SystemRoot%\Temp, can I eventually delete all of the 82 files (22.6MB)
that are still in the %USERPROFILE%\Local Settings\Temp directory?

Thanks!
 
P

Peter R. Fletcher

Yes. "Eventually" should be after the next reboot. _However_ I am
encountering increasing problems with (generally) downloaded
commercial software whose installation programs create temporary
subdirectories in my Temp directory which subsequent update installs
expect still to be able to find there! The downloaded install file for
Paintshop Pro 9.0 was the first instance of this that I ran into, but
I have had others since. The latest version of WinDVD appears to be
another culprit. If anything in your old Temp directory looks as if it
might be an unpacked install package, you would be well advised at
least to keep a backup copy somewhere.

My TEMP and TMP environment variables were set to %USERPROFILE%\Local
Settings\Temp.

Since I am the only user of the system, I changed these to
%SystemRoot%\Temp throughout my registry.

Here's my question: Since I have redirected temporary files to
%SystemRoot%\Temp, can I eventually delete all of the 82 files (22.6MB)
that are still in the %USERPROFILE%\Local Settings\Temp directory?

Thanks!

Please respond to the Newsgroup, so that others may benefit from the exchange.
Peter R. Fletcher
 
R

Rick Rogers

Hi Scott,

You should only need to change them in the environmental variables on the
advanced tab of system properties. You can delete the contents of the
user-defined temp folder provided that none of the files are needed to
complete an installation or update. Be aware that some programs define their
own location of temp files and may still use a temp folder other than the
one you specify. Nor does changing the location of the temp folder have any
affect on system performance.

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP

Windows help - www.rickrogers.org
 
G

George Valkov

Rick Rogers said:
Be aware that some programs define their own
location of temp files and may still use a temp folder
other than the one you specify.
And if there're no option in the program to change the TEMP directory, you
can redirect it to another location with this command:
LINKD Source [/D] Destination
linkd c:\oldTemp c:\newTemp
/D is used to remove a link
If I don't mistake, You can find LINKD.EXE in the Windos Resource kit. This
only works if c:\oldTemp is located on a NTFS partition.

Nor does changing the location of the temp folder have any affect on
system performance.
Beleave me, it does affect affect the performance in my case, because:
d:\windows\temp is on the old hard-disk that supports a maximum of 22MB/s
read/write, while the new location s:\temp is on a stripe partiotion (2 new
disks) and can do 150MB/s :) Plus it is 400GB large.
 
K

Ken Blake, MVP

My TEMP and TMP environment variables were set to %USERPROFILE%\Local
Settings\Temp.

Since I am the only user of the system, I changed these to
%SystemRoot%\Temp throughout my registry.

Here's my question: Since I have redirected temporary files to
%SystemRoot%\Temp, can I eventually delete all of the 82 files
(22.6MB) that are still in the %USERPROFILE%\Local Settings\Temp
directory?


Yes. You can and should delete all tmp files in *both* locations and you
should do this periodically--once a week or so.
 
G

George Valkov

Ken Blake said:
Yes. You can and should delete all tmp files in *both* locations and you
should do this periodically--once a week or so.

I use a script to automate this task:
rem deltemp.bat
erase /Q %systemroot%\system32\spool\printers\*.*
erase /Q "%SystemDrive%\Documents and settings\Administrator\Recent\*.*"
erase "%SystemDrive%\Documents and settings\Administrator\Local
Settings\Application Data\Microsoft\Terminal Server Client\Cache\*.bmc"
erase /a "%SystemDrive%\Documents and settings\Administrator\Local
Settings\Application Data\IconCache.db"
erase /F /S /Q /A "%SystemDrive%\Documents and settings\Administrator\Local
Settings\Temp\*.*"
erase /F /S /Q /A %systemroot%\Temp

This can be further optimized to detect and erase temporary files from all
disks, with a FOR loop:

for %%d in (c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do(

if exist %%d\WINDOWS\Temp (
erase /F /S /Q /A %%d\WINDOWS\Temp
)

)
 
S

Scott.A.Smith

When I try to delete all of the files in my old TEMP/TMP directory,
%USERPROFILE%\Local Settings\Temp, there are certain files that the
system tells me are read-only.

All of the files are also located elsewhere on the system in
InstallShield directories. Also, most of them -- with only a few
exceptions -- are also located in directories relating to our Dell-1600
printer.

I am inclined to go ahead and delete them -- despite their read-only
status -- since they are all duplicated elsewhere on the hard drive.
Would you all agree?

Btw, here is the list of files that the system is telling me are
read-only:

Dell1600.ds
Dll32.dll
Imp16d20.dll
Initscan.dib
Myscan.hlp
Myscan.ini
Myscan.loc
P3scan.cat
P3scan.inf
Prescan.dib
Ssdef32.ini
Ssdevn.dll
Ssds32.ini
Ssnew01.ini
Ssnew02.ini
Ssnew03.ini
Ssnew04.ini
Ssnew05.ini
Ssudmsg.loc
Ssuiext.dll
Ssusbpn.dll
Sswindow.dll
Tab16d20.dll
Twain.dll
Twain_32.dll
Twunk_16.exe
Twunk_32.exe
WIAEH.dll
WIAIPH.dll
WIASTIIO.dll

Thanks!
 
G

George Valkov

Scott.A.Smith said:
When I try to delete all of the files in my old TEMP/TMP directory,
%USERPROFILE%\Local Settings\Temp, there are certain files that the
system tells me are read-only.
I always erase all date in all temporary folders. /F is force read-only, /S
is subdirectories /Q is quiet (don't ask) /A is all files (includding
hidden, system, read-only).
erase /F /S /Q /A %temp%
And if later some installer is looking for it's files in %temp%, I just run
setup to unpack the files, or point it to the original setup files. I
usually have to do this when updating Apple iTunes and Adobe Acrobat.
All of the files are also located elsewhere on the system in
InstallShield directories. Also, most of them -- with only a few
exceptions -- are also located in directories relating to our Dell-1600
printer.
Sorry, I know nothing about Dell, my PC is full-custom desing, assembled by
me.
I am inclined to go ahead and delete them -- despite their read-only
status -- since they are all duplicated elsewhere on the hard drive.
Would you all agree?
It is stupidity if an application keeps importand data in temporary folder
or file with extentions: .TMP .BAK or filer starting with ~.
 
K

Ken Blake, MVP

When I try to delete all of the files in my old TEMP/TMP directory,
%USERPROFILE%\Local Settings\Temp, there are certain files that the
system tells me are read-only.

All of the files are also located elsewhere on the system in
InstallShield directories. Also, most of them -- with only a few
exceptions -- are also located in directories relating to our
Dell-1600 printer.

I am inclined to go ahead and delete them -- despite their read-only
status -- since they are all duplicated elsewhere on the hard drive.
Would you all agree?


Normally, the only files in the Temp folder have the extension ".tmp" and
are, by their very nature, temporary. Dell (or some installation program)
has apparently done something non-standard, and so it's hard for me to be
sure that this is safe. If I were in your shoes, what I would do is create
another folder somewhere else, and move all these files to it. If nothing
complains that the files are missing after a few weeks, then go ahead and
delete that folder.
 
S

Scott.A.Smith

Mr. Blake,

That's a brillaint suggestion! I've done as you've suggested and now
I'll just wait and see...

Thanks!
 
K

Ken Blake, MVP

Mr. Blake,


No formality is necessary. Just "Ken" is fine.

That's a brillaint suggestion! I've done as you've suggested and now
I'll just wait and see...

Thanks!


You're welcome. Glad to help.

May I make a request, though? Please quote enough of the message you're
responding to to put your reply into context (as I did above). Many
newsgroup participants (me, for example) don't save already-read messages
and a message without a quote is likely to be completely unintelligible to
people. That's especially true for the many of us who read lots of newsgroup
messages each day. In this case, I didn't remember what the thread was
about, and I had to check my sent mail folder to even see what the
suggestion I made was.
 
P

Pop`

Peter said:
... The downloaded install file for
Paintshop Pro 9.0 was the first instance of this that I ran into, but
I have had others since. The latest version of WinDVD appears to be
another culprit. ...
On 16 Sep 2006 00:05:25 -0700, (e-mail address removed) wrote:

Something's out of kilter there.
I've used PSP 7, 9, and now 10 (avoid 11), and that simply isn't true
unless you're exitting the install process before it's completed and you're
wanting to restart where the install process where it left off at a later
time.
PSP does NOT leave temp or tmp files that it needs to run. You can
delete all of them after the first reboot.
Neither does WinDVD. I routinely clean out ALL unused temp files, often
leaving the folders completely empty if it's done at start-time, and neither
program cares. AFAIK no application requires temp of tmp files to remain.
It defeats the purpose of temp files.

What specific PSP files do you find are necessary to keep in a temp or tmp
folder? And what is the exact location of that folder? PSP does use some
external storage folders, but they are NOT temp or tmp folders and none of
the files will be named like a temp file.

Pop`
 
P

Peter R. Fletcher

Something's out of kilter there.
I've used PSP 7, 9, and now 10 (avoid 11), and that simply isn't true
unless you're exitting the install process before it's completed and you're
wanting to restart where the install process where it left off at a later
time.
PSP does NOT leave temp or tmp files that it needs to run. You can
delete all of them after the first reboot.
Neither does WinDVD. I routinely clean out ALL unused temp files, often
leaving the folders completely empty if it's done at start-time, and neither
program cares. AFAIK no application requires temp of tmp files to remain.
It defeats the purpose of temp files.

What specific PSP files do you find are necessary to keep in a temp or tmp
folder? And what is the exact location of that folder? PSP does use some
external storage folders, but they are NOT temp or tmp folders and none of
the files will be named like a temp file.

Pop`
I have no idea exactly which files are needed - I now keep the entire
directory created by the downloaded install program - N.B. I have no
reason to believe that this problem exists if you get the program on
disk. I am not going to reinstall the program from scratch to check,
but from memory, the install prompts for a location to unpack files
to, _which_ _defaults_ _to_ _a_ _folder_ _in_ _the_ _system_ _Temp_
_directory_, and then separately asks you where to install the program
to. It is the "unpack to" folder and its contents that have to be
retained, and the install does warn you about this in its "small
print". I also didn't say these files were needed for the program to
_run_ - they aren't. They _are_ needed for successful running of
subsequent update patch executables.

The files in the "unpack folder" certainly do not have *.tmp" names,
but neither do those in the temporary unpack folders commonly and
properly created in the Temp directory by (IMHO) better-behaved
installation programs.

Please respond to the Newsgroup, so that others may benefit from the exchange.
Peter R. Fletcher
 
P

Pop`

Peter said:
I have no idea exactly which files are needed - I now keep the entire
directory created by the downloaded install program - N.B. I have no
reason to believe that this problem exists if you get the program on
disk. I am not going to reinstall the program from scratch to check,
but from memory, the install prompts for a location to unpack files
to, _which_ _defaults_ _to_ _a_ _folder_ _in_ _the_ _system_ _Temp_
_directory_, and then separately asks you where to install the program
to.

Ah, I believe you are correct; I misunderstood. Yes, it will indeed do
that.

It is the "unpack to" folder and its contents that have to be
retained, and the install does warn you about this in its "small
print". I also didn't say these files were needed for the program to
_run_ - they aren't. They _are_ needed for successful running of
subsequent update patch executables.

I part company with you there, but ... I'm not going to say you're wrong.
Instead I'll say that something is "strange". I did have an install issue
with PSP X that I think you mentioned, which I "fixed" by downloading
MSInstaller 3.1 from MS. Somehow, I missed it in the updates.
PSPX I can tell you a little about: It does have a couple nasty bugs,
the main one being the AUTO Update does NOT function correctly! The only
way to get correctly installed patches is to download them manually and then
install them, IN ORDER, from your hard drive. Any other method will result
in broken and incomplete upgrades; it's a well known bug in the Corel groups
(Corel now owns PSP).
The files in the "unpack folder" certainly do not have *.tmp" names,
but neither do those in the temporary unpack folders commonly and
properly created in the Temp directory by (IMHO) better-behaved
installation programs.

Agreed. At any rate, those files -should- not be needed again beyond the
initial install, once it is completed. Updates, etc., -should- not be
depending on those. Of course, there is no downside to keeping them if you
have the room, so it's really no big deal. I imagine most people don't even
notice them anyway.
The biggie about PSP though, and probably the other program you
mentioned, is to be sure you install the updates from disk and in order.
They don't take the fixes in 1 and put them into 2: 1 has to exist before 2
will "take" correctly. And so on.
Are you still having any specific problems? I have several versions of PSP
including 9, and also WINDVD, so I'd be willing to fiddle with
install/uninstalls if it'd help anything and there was a valid reason to do
so. My drives are imaged nightly so it's no problem if something should
screw up here.
If you'd like some first-hand assistance with PSP, and itmight be
relevant to windvd too, check out the Corel PaintshopPro newsgroups.
There's a group or more for every version of PSP there.

HTH
Pop`
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top