Discussion on:

87
Comments

Join the conversation!

Follow via:
RSS
Email Alert
0 Votes
+ -
Doing a restart or a shut off and then turning on the machine again before beginning a defrag makes perfect sense.
Editing the register is something I prefer not to do because it rarely involves 1,2 or 3 small steps.
Doing a defragmentation on 1 or 100 machines is when I can take my quiet time.
0 Votes
+ -
The part about clearing the swap file is actually incorrect unless you have set windows to clean it on exit.
The page file keeps itself pretty full, even after a reboot. To clean it out, open group policy editor (mmc.exe)
in the local computer policy/computer config/windows settings/security settings/local policies/security options/
you will fined (near the bottom) "Shutdown: Clear virtual memory pagefile"
enable this first.

Also, clean out the temps and prefetch folders. This will minimize the files on the system. I created a batch job to take care of this with a double click, then I shared it out to use it on other peoples systems as well (useful also before a files and settings transfer in XP).
Defrag can also sped up by emptying the recycle bin, stopping other startup apps, etc.
But after all of this, you did speed up the defrag time, but it took a lot of time before the defrag. An alternative is to use an alternate defragmentor that runs before the system fully boots, such as Winternals page file defrag (and yes, it also defragments the page file and system files which speeds up the rest of Windows).
0 Votes
+ -
Batch File
wvinkavich@... 12th Jul 2006
Techman, you wouldn't want to share that batch file with another overworked admin would you?
0 Votes
+ -
Apart from those folders mentioned by w2ktechman, it will be better to clean up IE temp Internet files as well. Usually there are hundred thousands of files cached there which slow the defrag and chkdsk.
0 Votes
+ -
Running this program regularly clears out the aforementioned temp files as well as other rubbish that accumulates on a PC.
0 Votes
+ -
Thanks! I'll do that. : )
0 Votes
+ -
Where do I find Ultra Win Clean?
0 Votes
+ -
Try Here...
PSK_ 26th Jul 2006
http://www.freedownloadscenter.com/Best/ultra-winclean.html The search term for Google is "Ultra WinClean", 2 words in stead of 3.

Good Luck.
How do you clean up IE temp Internet files? Thanks.
0 Votes
+ -
ie temp files
jkn1ck@... 28th Jul 2006
try disk cleanup

programs\accessories\systemtools\disk cleanup.exe
How do you clean up IE temp Internet files? Thanks.
0 Votes
+ -
Open Internet Explorer, go to Tools, Internet Options, go to the Advanced tab, and place a checkmark on 'Empty temporary Internet Explorer files when browser is closed'. Now you won't have to remember to manually clean IE's Temp files.
0 Votes
+ -
That's great--thanks. : )
0 Votes
+ -
Cleaning Program
RebelFlag 13th Jul 2006
You can also use ccleaner, which is free, and very effective. The web site is www.ccleaner.com.
0 Votes
+ -
re: ccleaner
NEES 14th Jul 2006
Freware--isn't that a security risk?
0 Votes
+ -
Freeware
olgarosm@... 17th Jul 2006
NEES:
Some of the best programs you'll find out there are freeware. CCleaner is a very good one. You just have to do a little search to know which are the good guys.
0 Votes
+ -
cleanmgr
jon_bjerke@... 17th Jul 2006
You can create a customized version of the cleanup wizard in XP. First, set your options on what you what to remove. "cleanmgr /sageset:99"

Then invoke from command line, run box, or shortcut, "cleanmgr /sagerun:99"
0 Votes
+ -
Open IE... TOOLS * INTERNET OPTIONS ... look at the 2nd window pane outlined "Temporary Internet Files".... Click DELETE FILES button.

Dont clean out cookies unless you want to loose access to previously visited pages.

happy
0 Votes
+ -
Hey, thanks a lot. Enjoy your day. : )
0 Votes
+ -
Disk Cleanup
rasilon 17th Jul 2006
I always run "Disk Cleanup" from the "Accessories\System Tools" first. It clears this out as well as the Recycle Bin and others.

I like the idea of running defrag right ater a boot. I *REALLY* dislike the idea of any editing of the registry unless absolutely unavoidable...

Hank Arnold
0 Votes
+ -
Disk Cleanup
pmseng 19th Jul 2006
"Disk Cleanup" is fine, but it takes so dang long to run! Ccleaner is my product of choice. I've been using it since they called themselves "Crap Cleaner". Visit www.ccleaner.com for details.
You can have IE empty its temporary files every time it closes. Click on Tools from the IE menu, then Internet Options, then on the Advanced tab, and then put a check in the box labeled "Empty Temporary Internet Files folder when browser is closed". This folder is mostly trash sprinkled with malware anyway.
Good one--thanks. : )
I was able to set "empty temp internet files folder when browser is closed" box for IE6 but I can't find it for IE7.....does anyone know where it is???? Thanks very much, Pete
With a bit of effort, I found it (again!!) - it appears under Tools/Internet Options/Advanced Tab - very near the bottom of that long list of options (one of very few in the list that I understand!).
Regards, George
0 Votes
+ -
Defrag on shutdown
curtis2164 Updated - 13th Jul 2006
Since my 200gb HD is formatted into several drives would it be possible to just add the defrag lines of all drives to make this handy item work in the prescribed succession? i.e:

Launch the Registry Editor (Regedit.exe).
Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce.
Right-click the RunOncesubkey and select New | String Value.
Name the value Defrag and press [Enter] twice.
Type Defrag.exe c: /f in the Value Data text box, and click OK. (Note: If I were to add the following on the next lines, would it perform the operation?)This is how my batch file would work (without the line numbers and code of course). My next question is: Will it work????


1. regedit

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce

2. defrag (I would name the value 'defrag' in the registry at this point).

3. Right-click the RunOncesubkey and select New | String Value

4. [Enter]

5. [Enter]

6. defrag.exe c: /f

7. defrag.exe e: /f

8. defrag.exe f: /f

9. defrag.exe g: /f

10. defrag.exe h: /f

11. defrag.exe i: /f

12. Close the Registry Editor and restart Windows.


If someone could tell me if I am on the right path (or not) I would appreciate it. Ken
0 Votes
+ -
that is not a batch file, it is a registry edit. Someone else lower in the thread already pointed out how to make use of a batch file and scheduling it (or you could put the batch file in your StartUp "folder" and it would run every time you boot.

What you are trying would be easy to do but involves a few more values. Since listing the values is more time consuming that just writing the reg try this:

Copy and paste EVERYTHING (including all indicated blank lines) between but not including the lines of asterisks into Notepad and name it something like -- XP_Fast_Defrag.reg

*********************
REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"DefragC"="Defrag.exe c: /f"
"DefragD"="Defrag.exe d: /f"
"DefragE"="Defrag.exe e: /f"
"DefragF"="Defrag.exe f: /f"
"DefragG"="Defrag.exe g: /f"
"DefragH"="Defrag.exe h: /f"
"DefragI"="Defrag.exe i: /f"

*******************

The blank line below REGEDIT4 and the blank line below the last entry are important and need to be in the file you create.

Now place that on your desktop and whenever you want to defrag simply double click it to merge it into the Registry and it will defrag the drives next time you reboot.
If you want a good auto cleaner for everything not just Internet Explorer and free of charge:

http://www.browsertools.net/IE-Privacy-Keeper/
0 Votes
+ -
Quiet time?
eberhartj@... 17th Jul 2006
I'm glad you don't work for me.
I worked for a boss once who installed a new phone system with voice mail and a switchboard to direct calls,as all calls went through the switchboard.

Within a week the receptionist was again announcing everyone's calls on the overhead bitch box, because the owner couldn't stand the quiet.
0 Votes
+ -
I made the defrag on startup a one-step process by editing a file in notepad called defrag.reg
Here's what it contained...
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"Defrag"="Defrag.exe c: /f"

All I do is click defrag.reg to add the key to the registry. It run on windows restart and all is good
Yeah, everyone has an easy answer. Just work with the registry. Hey! Meat heads out there, think about it. You are going to get the average user to go and trash their systems... Get a clue, not everyone can comprehend the registry. Ya want an answer? OK. Just replace Microsoft with SuSE Linux. There! No more defrag etc. The Ext3 file system takes care of everything. Nuff said....
0 Votes
+ -
The program is free, and the first time I used it, it ran all 200 gigs in about 10 minutes.

There may be faster programs, free or for a price, but I'll stick with AusLogics.
0 Votes
+ -
Prior to defraging, be sure to turn OFF your background anti-virus, and anti-spyware utilities. Doing so will prevent constant scanning of every file that is read & written.

Of course, don't forget to turn them back on once the defrag operation is done!
0 Votes
+ -
be sure to disconnect from the Internet during this process. On my system (HP lap top with Windows XP) I accomplish this by using the icon in the system tray for the wireless connection. Right clicking this pops up a menu and selecting Disable.

Alternatively, from the start button I can select Connect To which displays a menu with the active connection as a choice which, when selected displays a dialog with a Disable button.

Finally you can go to Control Panel, Network Connections which will show all the configured connections (as well as a couple of wizards). Again select the active connection (you'll need to know which one) and disable.

Hope this is helpful . . .

John
0 Votes
+ -
Batch file.
dcaissie@... Updated - 13th Jul 2006
I just run a batch file.
with this line in it.
Defrag c: /v

Then create a short cut of the batch file.
Now I just setup a scheduled task to run the short cut.

I use this to defrag the systems at night.

One last note if you set this up in the admin account the user will never see this running at all it will run in the background.
Dan
0 Votes
+ -
Batch file
ghughes@... 13th Jul 2006
I also use a batch file to defrag the computers I am responsible for:
@ECHO OFF
START "Defragmenting Hard Drive Before Shut Down" /WAIT defrag.exe c: -f
I place this as a GPO on my domain OU as a shutdown script.
As users shutdown at days end, thier systems defrag. Works like a charm and because it's a GPO it doesn't need to have admin security privledges, so it even works on the systems of "Restricted Users".
What is the difference between the -f and /v options that I've seen used in batch file examples?

Does START create a service -- is that the idea here?
0 Votes
+ -
START defined...
Roger 18th Jul 2006
Start basically executes a program but allows you to control what happens when the program runs. You can set the window size, give the window a title, control the speed the program runs at, and tell the computer if you want it to wait until the program completes.

In it's simplest form

START "window title" /priority /wait progname parameters

For defrag within a batch file

START "Defragment C:" /min /abovenormal /wait defrag c: -f

The title (enclosed in quotes) may be omitted
/min or /max sets the window size as minimized or full-screen
/abovenormal sets the priority (realtime, belownormal, normal, abovenormal, etc.)
/wait forces the batch file to wait until defrag completes before continuing execution of the batch.
the -f at the end tells defrag to defragment the drive even if it does not need defragmentation.

The defaults are normal priority, no waiting, normal window, and don't defrag if the drive doesn't have enough fragmentation.
0 Votes
+ -
Open a command prompt window and type:
help start
or
start /?

This should work for any (most?) 'command line' commands. Appears not to work for windows programs, for example try:
help notepad
or
notepad /?
to see.

Hope this is helpful . . .

John
When I read this article, I was dearly hoping someone would bring up using a batch file and the built-in task scheduler. Why hack into the registry if you don't have to???

We have ours scheduled to run on all our XPs at user login and it works great.
0 Votes
+ -
I have a batch file which provides a menu for setting the CleanManager parameters, running the CleanManager, restarting then running ChkDisk, and two options for running Defrag [restart or shutdown when finished] both of which delete the contents of the Temp and Prefetch before Defragging.

My batch file is at
http://www.2clones.com/maintainXP.bat.txt

Remove the .txt extension and create a shortcut to the maintainXP.bat to run it.

If you have suggestions or make improvements, plesase tell me about them.

Butch
0 Votes
+ -
On www.langa.com you'll find in Free Downloads a batch file you can customize to your os. Works like a dream!
0 Votes
+ -
I use schtasks to automate processes such as defrag and restarts after updates. Below is a line of code from one of my files that restarts production systems daily at 3:00 a.m. I use very similiar code to run defrag after the restarts. This works for us because no systems are in use between midnight and 6:00 a.m.

I like schtasks. Type schtasks /? at command prompt to check it out. As you'll see, there are a lot of options available.

schtasks.exe /create /SC DAILY /TN RebootYou /TR "\"C:\windows\system32\shutdown.exe\"-f -r" /ST 03:00:00 /SD 12/18/2007 /RU SYSTEM

* No need to provide password if you run it under System account.

Happy New Year!

John
0 Votes
+ -
Diskeeper
PSK_ 13th Jul 2006
Get a trial version of Diskeeper from Executive software. It is so fast and has so many extras like "Boot time defrag", "Defrag Pagefile", Defrag MBR" and "Move all folders to the front of the drive" that you will want to buy it as soon as the trial runs out. You can also set it up to do continual touchup when ever the screensaver comes on. Awsome program. Check it out
0 Votes
+ -
So how much...
ghughes@... 13th Jul 2006
... do you make on commission? LOL
Seriously, I think the idea was to fix this without spending money on a separately developed solution.
0 Votes
+ -
Actually, diskkeeper is not a seperate solution. The defrag program that ships with winXP is a very lite version of Diskkeeper.
0 Votes
+ -
Gotta tell you that Diskeeper is a gem - easily the best defragmenting tool I've used in 24 years of using PCs. Puts Norton SystemWorks to shame (and SystemWorks puts Windows own defragger to shame). Get the Diskeeper Professional version for the most cost effective set of features. We've got Diskeeper Professional Premier version 10 set up on all our computers to simultaneously defrag the C and D drive on each computer each morning between 8 am and 9 am -- and I've got to admit they do run faster and more smoothly with this painless scheduling. I really loved how it lets you increase the size of the Master File Table so it doesn't fragment (first time I've ever seen this feature). A true gem. The Diskeeper Professional Premier edition retails for $99.95 -- and it's worth every penny. Other individual computer versions run from $29.95 to $49.95.
Thanks for that info & recommendation. I'll give it a try, too. : )
They are a competitior and claim in a white paper that they have better result and use the Window API that make it safer according to them.

Just to let you know.
Keyboard Shortcuts:
Prev
Next
Toggle
Join the conversation
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.