• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

How to make Defrag "Autorun" in Scheduled Tasks?

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Randyman...

Member
Joined
May 8, 2004
Hello,

In older Windows OS's, I remember you had the "Maintenance Wizard" that let you do a disk cleanup, scandisk, and a defrag all on a regular schedule, and 100% automated (no intervention).

How do I accomplish this in XP-Pro SP2? I tried to put the "dfrg.exe" in the Scheduled Tasks, and it opens it, but it requires user input to actually start defragging (you still have to manually click the "defrag" button, or it won't do anything). Does it involve the Command Prompt?

Thanks :cool:
 
Add this to the end of the Run line command...

C:\Windows\System32\dfrg.exe C:

...you can replace the C: with another volume letter, and/or add to the above command as such: C:, D:, E:, etc. If Scheduled Tasks asks for a password, but you don't have a password set...

...first, go to: C:\Documents and Settings | All Users | Application Data | Microsoft | Crypto | RSA | S-1-5-18 and delete the files in there (if there are any). Scheduled Tasks will recreate the files needed. This folder is hidden by default....to show hidden files: Start | Run and type control folders | 'View' tab | Check 'Show hidden files and folders'. A scheduled task can be run without the need to enter a password, but you'll need to disable the following setting...

Start | Control Panel | Administrative Tools | Local Security Policy | Local Policies | Security options | In the right hand pane (third down)...

Accounts: Limit local account use of blank passwords to console logon only

This is enabled by default...right click and select 'Properties' | Select the 'Disabled' radio button to disable it. You can also access "Local Security Settings" by typing secpol.msc in the Run box.
 
O&O has a scheduler built in. It's under the Jobs menu. Just add a new job and it'll defrag to the time/day you specify on a daily, weekly, or monthly schedule.

Depending on the version you have, I believe a daily job is set by default for C: when fragmentation reaches 20%. You can edit this one or create another and delete it if you wish.
 
Back