i found that many .tmp files are left behind on the system, and i woumd
like
to write a small program to clean these up , before some get locked by the
os.
Actually, TEMP files from the previous boot almost
never get locked on the next boot -- most of the files
in temp are from applications and the OS isn't usually
(directly) involved with them.
I do this -- and it works fine even while the OS is
running and files are locked:
rd "%temp%" /s /q
if not exist "%temp%" md "%temp%"
The above is pretty 'violent' but all it does is kill the entire "temp"
directory tree and then recreate then re-create the directory if
it worked.
If you use CORRECT (tight) permissions you also need to add
something like:
REM Following untested, but should be the correct idea:
cacls "%temp%" /t /p Administrators:F "creator owner":f
cacls "%temp%" /e /p "Authenticated Users":C
i see that some install programs replace system dll's the moment windows
No, an application should not be "replacing" system DLL
(especially not on each boot).
How do you "see" this?
boots ,otherwise they are locked .
If they are OPENED then yes, Exe and DLL files are locked;
sometimes you can rename them so that they will never work
again (BE CAREFUL) though.
or should i place something in the runonce registry key ?
What applications interfere with your machine BEFORE you
can logon?
There is something odd going on here....