How to Run Defrag on Windows XP using DefragPlus
I created the attached tool to make common disk defragging much easier and efficient. This tool was originally a part of a backup script I created at work but I modified it as a standalone utility so it can be used by anyone on any system.
Although I’ve been using this tool for some time without any problems, you are welcome to use this tool at your own risk. I do not accept any responsibility if any issues were encountered but I will try to answer the related questions you might have.
The process is quite generic so I seriously doubt there will be any problems at all.
User must have admin level access on the subject system otherwise the tool may not work properly though wouldn’t do any harm even if it failed either.
Target drive for this utility is C drive where Windows is normally installed on by default.
Overview of each option available from the Maintenance (main) Menu:
Running defrag on a partition with a high level of file fragmentation could significantly improve overall system and application performance. Defrag and Analyze processes run essentially the same way whether GUI or Command Line is used.
- IE Cleanup: Permanently deletes all Internet Explorer (5.x-6.x) cache files including browser history, temp files and cookies.
- Disk Cleanup: Thorough cleanup of temp/junk files; 1st step is done through the utility, 2nd step runs XP Cleanup Manager with preconfigured standard options.
- Disk Check aka Scandisk: Schedules Drive C to be scanned for basic disk read errors, this process will also fix file system errors if any were found.
Bad sector check (lower option) will not be run which is used for recovery of bad ones if they existed as this process would take significantly longer time but you should also run Scandisk (with this option selected) once in a while to minimize the data loss and various other system errors. Many people believe their newly purchased Hard Drive would be free of defects which is a very wrong assumption. Often, even the brand new Hard Drives could have bad sectors on them. So it is always wise to run Scandisk and check for bad sectors first prior to installing the operating system. Most newer Hard Drives have reserved sectors that are never used or are accessible by the operating system. During a full Disk Check if any bad sectors are found the utility would mark that sector as bad and replace it with one of the good ones in the reserve. This operation would also take place if there is data on that sector but the utility would attempt to transfer the data residing on the bad sector to the new sector but of course this is not always a 100% successful process hence the importance of running a complete Scandisk prior to installing anything on the drive. Ideally, you should always run Scandisk before running defrag.
- Disk Defragmentation: This is a critical and routine part of system maintenance. Always run analysis prior to running defrag to see if it's needed.
It would be ideal to run defrag when Windows is running in Safe Mode to minimize errors and interruption that might occur in Normal mode due to non-system critical processes and services running.
What to do before running defrag in Safe mode:
a. Disable screensaver -if it was enabled (DefragPlus handles this automatically).
b. Disable Standby and Hibernation features if they were enabled (see below How 2 section).
c. Delete all temp/junk files and folders (could be done via DefragPlus).
d. Disable Disk prefetching and Virtual Memory (page file) (DefragPlus handles this automatically).
What to do before running defrag in Normal mode addition to the above 4 steps:
e. Stop/close all 3rd party programs and service, including the background ones such as anti-virus scanners, 3rd party firewall programs, etc.
f. Disconnect all external connections, drives, peripherals such as broadband network cables, printer cable, USB cables, etc.
g. Remove all discs from the available CD, DVD and floppy drives.
After done with all applicable steps mentioned above, defrag process can be started.
These steps would ensure proper, more efficient and faster defragmentation.
DefragPlus will automatically disable screensaver,
****************************************
Here is how to use DefragPlus:
1. Run options 1 (IE Cleanup) & 2 (Disk Cleanup) (if needed)
2. Run an analysis of the disk to see if defrag is needed (option 4 then A to analyze drive C).
3. If defrag is needed, then schedule Scandisk to run on next boot (option 3, then type Y and press ENTER, program will automatically reboot the system shortly after. The program backs up current user’s screensaver related settings prior to disabling it. The program also disables disk prefetching and virtual memory to optimize the Defragmentation.
4. Once back on desktop, reboot again in Safe mode or Normal mode. If Windows is running in Normal mode, close all running programs, etc. and then open DefragPlus to run defrag (option 4, press any key to continue and then press D). Defragmentation process will automatically stop certain standard Windows services if they are running during the defrag process.
Once defrag is completed the program will re-enable disk prefetching and virtual memory and apply the previously backed up screensaver related settings back into the registry and then automatically reboot the system which would also restart the previously stopped services that were configured to start along with Windows.
Additional Notes: DefragPlus makes use of a few 3rd party external commands which gets deleted when the program is exiting. The included process.exe might cause a false alarm by certain AV scanners if identified as a CPU hacking virus due to its functionality of killing processes defined in the script. This is not something to worry about. DefragPlus, using process.exe, kills any instances of explorer.exe (Windows Shell), rundll32.exe (generic processes, there shouldn’t be any if all programs are closed) and iexplore.exe (Internet Explorer, again if there are no IE windows, there shouldn’t be any of these either. If you see any, that is bad news!).
How to disable/enable Standby and Hibernation (Power Options):
Start > Run > powercfg.cpl > OK >
How to disable/enable Virtual Memory (Page File settings):
Start > Run > sysdm.cpl ,3 > OK >
~TL![]()















