how to: create simple logout script file

D

di98mase

Hi,

I would like to create a script file that shall:
1) be run every time I logout from my Win XP.
2) this script shall delete my "recent" file so that no traces are shown of
what files I have been working with the last session is saved.

Q: Can this be done with a bat-file?

Q: where shall I save the file?

Q: do I have to set permissions or somethin in order to run bat-files as a
"user", i.e. not as admin?

di98mase
 
G

Guest

Here are 2 batch files - the first one uses just windows commands and the
second one requires a 3rd party tool from
http://www.optimumx.com/download/#IECache
I would suggest the second batch file. Just download iecache.exe and place
it in the system32 folder or any where in the path. You can save or put the
file anywhere, just go into group policy and assign it to the logoff script.

[1] @echo off
[2] cd "%userprofile%\recent"
[3] del /q *.*
[4] cd "%userprofile%\cookies"
[5] del /q *.*
[6] cd "%userprofile%\locals~1\temp"
[7] for /f "tokens=*" %%i in ('dir /b /s /a-d') do del /q "%%i"
[8] for /f "tokens=*" %%i in ('dir /b /s /a:d') do rmdir /q "%%i"
[9] cd cd "%userprofile%\locals~1\temporary"
[10] for /f "tokens=*" %%i in ('dir /b /s /a-d') do del /q "%%i"
[11] for /f "tokens=*" %%i in ('dir /b /s /a:d') do rmdir /q "%%i"
[12] exit


[1] @echo off
[2] cd "%userprofile%\recent"
[3] del /q *.*
[4] iecache /delete
[5] exit
 

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