Create Your Own Windows 7 Style Automatic Defrag in Windows

chief

Prime VIP
One of the cool features in Vista and Windows 7 is it’s set to automatically defrag your hard drive by default on a weekly basis. If you’re still using XP, here’s how you can set it up to work similarly to Vista or Windows 7.
Defragging your hard drive ensures that the data on the disk is in contiguous order for easier access to files and programs. Although the jury is still out on whether or not it improves performance on the newest machines, it’s good to know your drive is always in order. By default, it’s set to run weekly in Vista and Windows 7, and here we’ll look at making it run automatically in XP like it does in the newer versions of Windows.
Defrag in Windows 7 & Vista

Windows 7 & Vista will automatically defrag your hard drive when it’s idle and the feature works well. In Windows 7 it’s set to run at 1am every Wednesday as a low priority background task. Of course you can also change the defrag schedule or turn it completely off if you want.
sshot20100925234708-1.png

Defrag in XP

On older XP machines, defragging the drive is a recommended task for best performance, but it’s not enabled by default. There are a couple of ways to access Disk Defragmenter in XP.
A quick way is to go to Start \ Run and type in dfr.msc and hit Enter or click OK.
sshot20100926164325-1.png

Alternately, you can open My Computer, right-click on your local drive, and select Properties.
sshot20100926164432-1.png

In the Local Disk Properties screen click the Tools tab, then Defragment Now.
sshot20100926164446-1.png

Disk Defragmenter opens and you can analyze your drive, view a report, or kick off the defrag process manually. One of the cool things available in XP Defrag when analyzing your disk is the GUI.
sshot20100926165030-1.png

You can still analyze your disk in Windows 7 or Vista, but don’t get the graphical interface.
sshot20100925234219-1.png

Make XP Defrag Run Like in Vista or Windows 7

If you want Disk Defragmenter to work like it does in Vista or Windows 7, we need to create a Scheduled Task. Open Control Panel in Classic View and open Scheduled Tasks.
sshot20100926175028-1.png

The Scheduled Task Wizard kicks off and when you come to the screen to select the program to run, click the Browse button.
sshot20100926175237-1.png

Now enter the following into the File name field and click Open.
%systemroot%\system32\defrag.exe
sshot20100926175321-1.png

Give the task a name…it will be defrag by default but you can name it to whatever you want. Make sure to select Weekly and click Next.
sshot20100926175355-1.png

For the Start time enter 1:00 AM, run every week, and for the day select Wednesday.
Note: This is what the Windows 7 default schedule is. Of course you can set it to whatever you want, but here we want to make it the same as the Windows 7 default.
sshot20100926175416-1.png

The default user name will automatically be entered, and you’ll need to enter the correct password.
sshot20100926175626-1.png

Now that everything looks good and is correctly scheduled, make sure to check Open advanced properties for this task when I click Finish.
sshot20100926175641-1.png

When Advanced Properties opens in the Run field after defrag.exe enter a space then the letter of your local drive, in most cases it’s the C: drive…click OK.
sshot20100926211937-1.png
 

chief

Prime VIP
Re: Create Your Own Windows 7 Style Automatic Defrag in Wind

You might also want to go into Settings and have your PC wake up to run the task and adjust the idle time.
sshot20100926234026-1.png

You’ll be prompted to enter in your login credentials again and click OK.
sshot20100926212048-1.png

Now you’ll see an icon for your new Defrag Scheduled Task.
sshot20100926212138-1.png

When it runs, the Command Prompt screen will open and run an analysis and complete the defrag process.
sshot20100926220041-1.png

You won’t see it running via the GUI but it’s running in the background. If you open up Task Manager you’ll see the process running.
sshot20100926220202-1.png

That is all there is to it. Now your XP machine is set to automatically defrag the local hard drive just like it does in Vista and Windows 7.
 
Top