A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » The Basics
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Help us create a batch file to clean a pc of stuff (hand computer to mom)



 
 
Thread Tools Display Modes
  #1  
Old November 2nd 04, 09:39 AM
Orak Listalavostok
external usenet poster
 
Posts: n/a
Default Help us create a batch file to clean a pc of stuff (hand computer to mom)

I started writing a batch file for quick cleanup of an WinXP PC.
My batch file is below.
I'm no expert so I am sure stuff is missing (what is missing)?
The goal is a decent batch file which removes most privacy concerns.
Let's say the PC should be clean enough to hand to your boss or mom.
How can we improve this cleanpc.bat script?
Is another cleanpc.bat script out there that is better for starters?
How can we add variables (eg for the username & mozzilla directory)?

Orak Listalavostok

echo off
erase /s/q/f "c:\temp"
erase /s/q/f "c:\documents and settings\administrator\recent"
erase /s/q/f "c:\documents and settings\administrator\my recent
documents"
erase /s/q/f "c:\documents and settings\administrator\local
settings\my recent documents"
rmdir /s/q "c:\quarantine"
erase /s/q/f "c:\windows\downloaded program files"
erase /s/q/f "c:\windows\temp"
erase /s/q/f "c:\windows\cookies"
erase /s//f "c:\windows\history"
erase /s/q/f "c:\windows\tempor~1\content.ie5"
erase /s/q/f "c:\windows\recent"
erase /s/q/f "c:\windows\applog"
erase /s/q/f "c:\windows\desktop\*.tmp"
erase /s/q/f "c:\windows\prefetch\*.*"
erase /s/q/f "c:\documents and settings\administrator\cookies"
erase /s/q/f "c:\documents and settings\administrator\local
settings\history"
erase /s/q/f "c:\documents and settings\administrator\local
settings\temp"
erase /s/q/f "c:\documents and settings\administrator\local
settings\temporary internet files"
erase /s/q/f "c:\documents and settings\administrator\local
settings\application data"
erase /s/q/f "c:\documents and settings\administrator\userdata"
erase /s/q/f "c:\documents and settings\administrator\my recent
documents"
erase /s/q/f "c:\windows\system32\catroot2\*.log"
erase /s/q/f "c:\documents and Settings\administrator\application
data\mozilla\Profiles\default\mhy0feee.slt\cache"
erase /s/q/f "c:\documents and Settings\administrator\application
data\mozilla\Profiles\default\\mhy0feee.slt\cache. Trash"
erase /s/q/f "c:\documents and Settings\administrator\application
data\mozilla\Profiles\default\mhy0feee.slt\cookies .txt"
erase /s/q/f "c:\documents and settings\administrator\application
data\mozilla\Profiles\default\mhy0feee.slt\downloa ds.rdf"
erase /s/q/f "c:\documents and settings\administrator\application
data\mozilla\Profiles\default\mhy0feee.slt\history .dat"
erase /s/q/f "c:\documents and settings\administrator\application
data\mozilla\Profiles\default\mhy0feee.slt\bookmar ks.html"
erase /s/q/f "c:\windows\debug\usermode\userenv.log"
erase /s/q/f "c:\windows\debug\usermode\userenv.bak"
Ads
  #2  
Old November 2nd 04, 11:38 AM
Hugh
external usenet poster
 
Posts: n/a
Default Help us create a batch file to clean a pc of stuff (hand computer

Fred Langa has done this already. Works well if you read the instructions.
http://www.langa.com/cleanup_bat.htm

"Orak Listalavostok" wrote:

I started writing a batch file for quick cleanup of an WinXP PC.
My batch file is below.
I'm no expert so I am sure stuff is missing (what is missing)?
The goal is a decent batch file which removes most privacy concerns.
Let's say the PC should be clean enough to hand to your boss or mom.
How can we improve this cleanpc.bat script?
Is another cleanpc.bat script out there that is better for starters?
How can we add variables (eg for the username & mozzilla directory)?

Orak Listalavostok

echo off
erase /s/q/f "c:\temp"
erase /s/q/f "c:\documents and settings\administrator\recent"
erase /s/q/f "c:\documents and settings\administrator\my recent
documents"
erase /s/q/f "c:\documents and settings\administrator\local
settings\my recent documents"
rmdir /s/q "c:\quarantine"
erase /s/q/f "c:\windows\downloaded program files"
erase /s/q/f "c:\windows\temp"
erase /s/q/f "c:\windows\cookies"
erase /s//f "c:\windows\history"
erase /s/q/f "c:\windows\tempor~1\content.ie5"
erase /s/q/f "c:\windows\recent"
erase /s/q/f "c:\windows\applog"
erase /s/q/f "c:\windows\desktop\*.tmp"
erase /s/q/f "c:\windows\prefetch\*.*"
erase /s/q/f "c:\documents and settings\administrator\cookies"
erase /s/q/f "c:\documents and settings\administrator\local
settings\history"
erase /s/q/f "c:\documents and settings\administrator\local
settings\temp"
erase /s/q/f "c:\documents and settings\administrator\local
settings\temporary internet files"
erase /s/q/f "c:\documents and settings\administrator\local
settings\application data"
erase /s/q/f "c:\documents and settings\administrator\userdata"
erase /s/q/f "c:\documents and settings\administrator\my recent
documents"
erase /s/q/f "c:\windows\system32\catroot2\*.log"
erase /s/q/f "c:\documents and Settings\administrator\application
data\mozilla\Profiles\default\mhy0feee.slt\cache"
erase /s/q/f "c:\documents and Settings\administrator\application
data\mozilla\Profiles\default\\mhy0feee.slt\cache. Trash"
erase /s/q/f "c:\documents and Settings\administrator\application
data\mozilla\Profiles\default\mhy0feee.slt\cookies .txt"
erase /s/q/f "c:\documents and settings\administrator\application
data\mozilla\Profiles\default\mhy0feee.slt\downloa ds.rdf"
erase /s/q/f "c:\documents and settings\administrator\application
data\mozilla\Profiles\default\mhy0feee.slt\history .dat"
erase /s/q/f "c:\documents and settings\administrator\application
data\mozilla\Profiles\default\mhy0feee.slt\bookmar ks.html"
erase /s/q/f "c:\windows\debug\usermode\userenv.log"
erase /s/q/f "c:\windows\debug\usermode\userenv.bak"

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about SpyBot 1.3 DebbieG General XP issues or comments 2 September 19th 04 02:47 AM
Printer installation Cannot create a file when that file already exists. Steve Kallesser Hardware and Windows XP 1 September 16th 04 05:37 AM






All times are GMT +1. The time now is 03:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.