Skip to main content

RightClick drive defragmentation.

Posted October 2002 by Steve Sinchak

Ok... there's two ways of achieving this.


The easy way:

  1. Create a .reg file and name it to whatever you think might fit. (create an empty .txt-file and rename it to whatever.reg)

  2. Rightclick it and choose "edit".

  3. Paste the following into it:
    Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Drive\shell\Defrag\Command]
@="defrag.exe %1 -f -v"

  1. Save and close.

  2. Doubleclick it and answer yes/ok to the questions.

  3. Rightclick a drive and choose 'Defrag' to defragment it.


The not as simple but yet not difficult way:

  1. Open RegEdit.

2. Navigate to "HKEY_CLASSES_ROOT\Drive\shell".

  1. Create a new Key named "Defrag".
    (This is what will show in the RightClick-menu so if you'd like it to say "Mah 1337 d3Phr4G-h4Ck" then use that keyname ;) )

  2. Create a sub-key to you ¨"Defrag" key and name it "Command".
    (This name is not an option)

  3. Go to the "Command" key and doubleclick "(default)".

  4. Change it's value to "defrag.exe %1 -f -v"
    -f = force defragmentation even if there's to little free space on the drive.
    -v = Verbose mode.

  5. Save and you're done.


I have only tried this on WinXP Pro, so i'm not sure if it works on WinXP Home.

Related Posts


If you own a Google Chromecast streaming device, you can easily share a browser tab in Chrome browser or even your entire desktop.  This can be very useful when presenting from your laptop or if you just want to watch something on a big screen that is only on your PC.  The only requirement is you must be on the same network as your Chromecast...

Read More

If you are a fan of minimalist desktop experiences, hiding the desktop icons are an easy way to clean up the Windows interface.  Instead of saving everything to your desktop, use the default profile folders such as downloads and documents.  Actually hiding all the icons on your desktop is a very simple customization hidden in the right-click context menu.  Just right-click on the desktop, select View...

Read More

Google security researchers have published details about a major security flaw found in the SSL protocol that is used to encrypt data transferred between your browser and a web server. SSL is typically used in situations where logon credentials are validated...

Read More

Enabling two-factor authentication is a great way to add an additional level of protection to your Microsoft account.  Even if your password is stolen, your account is still protected because two-factor authetication requires an additional level of verification to log in. Microsoft calls their version of two-factor authentication "two-step verification" and it works by providing you with a random code...

Read More