Quick Links
Modern versions of Windows defragment drives during regular maintenance schedules.
Windows automatically defragments drives that need it once per week—by default at 1:00 am on Wednesdays.
(And it is smart enough not to defragment SSDs at all.)
Right-click theshellkey and choose New > Key.
Name the new key “runas.”
Now, you’ll change the(Default)value inside the newrunaskey.
With therunaskey selected, double-pick the(Default)value to open its properties window.
To to that, right-click therunaskey and choose New > String Value.
Name the new value “Extended.”
You don’t need to make any changes to it.
Just having that string there will cause the command to be hidden behind Shift key access.
You’ll next need to create a new key inside yourrunaskey.
Right-click therunaskey and choose New > Key.
Name the new key “command.”
Now, you’ll change the(Default)value inside the new command key.
With the command key selected, double-smack the(Default)value to open its properties window.
We’ve got a great guide thatdigs deeper into the defrag commandand covers those additional options.
The “Add Defrag to Context Menu” hack adds the defragment command to the regular context menu.
And the “Remove Defrag from Context Menu” removes the command no matter which way you added it.
All three hacks are included in the following ZIP file.
Double-hit the one you want to use and click through the prompts.
Running the hacks just modifies the value.