Windows XP: Scheduling defrag.exe
Programs like Diskeeper allow you to schedule defragmentation scans and keep the bits (pieces) of files together. This helps your system perform better because it’s not having to search for every piece of a file on different places on the drive.
What if you just want to use the built-in Windows defrag program on a schedule? I know what you’re thinking. “Duh, just open Task Scheduler and choose it from the list of programs.” Well, you’d be wrong. Go ahead and look in the Scheduled Task Wizard and you won’t find defrag in that list. I don’t know why Microsoft removed it but they did. Here is how to make it work.
- Go into the Control Panel and open Scheduled Task.
- Double-click on Add Scheduled Task.
- Click Next on the first window.
- Click the Browse button (under the list of programs, where defrag should have been).
- Browse to the system folder (usually C:\WINDOWS), System32 and double-click on defrag.exe.
- On the window that opens, you can name the task anything you want. I called mine “Sam”. You can also choose how often to run the task. Monthly will do nicely. Click Next.
- Choose the time, day and months (all by default) you want the task to run. When choosing a time, pick a time when you probably won’t be using the computer, say 3 a.m. Click Next.
- Enter the username and password (twice) for the account to be used by the defrag program. The user must have admin rights to the system. Click Next.
- Put a checkmark next to Open advanced properties for this task when I click Finish and then click Finish.
- There are some more features that must be configured. Hence this step.
- Double check that the information showing in the Run: field matches where you found the defrag.exe file. By default, it should be C:\WINDOWS\system32\defrag.exe.
- At the end of the Run: command, add the drive letter you want defragged. If you just want the C: drive defragged, the command would look like this:
C:\WINDOWS\system32\defrag.exe C:. - Click the Set password… button and type the password (twice) that matches the username located next to Run as:.
- Click OK and you’re done.
Congratulations, you created a task to defrag your hard drive. Unfortunately, one of the limitations is that you can only set one drive volumne (C:, D:, etc.) at a time. This is probably fine for the average Joe or Jane user. If you have more than one drive you want defragged, you will have to either create another task or purchase software (like Diskeeper) that allows scheduling multiple drive defragmentation.
You can have a defrag report generated by appending /v >report.txt to the end of the Run: command. This would defrag C: and put a report, called DefragReport.txt, in the root directory (C:) when it finished:
C:\WINDOWS\system32\defrag.exe C: /V >C:\DefragReport.txt.
In case you didn’t know, the defrag program built into Windows XP was developed by the same company, Executive Software, that markets Diskeeper. It’s not as feature rich as Diskeeper but it does a very good job of organizing the data.
(Article 1, Day 1)
You can leave a response, or trackback from your own site.























Clock’s ticking……. where’s #2?
Hey! I said “14 articles in 14 days”….not “1 article every day for 14 days”
I’m working on #2 right now. It should be up within the next couple of hours. Remember, I’m on CST time so I’ve still got 4.5 hours.