So, we are back with another Windows Registry hack, which will let you add Defragment, to the Right-Click Context Menu for a Drive, which is very useful, if you regularly maintain your computer using Windows inbuilt maintenance utilities.
The trick is simple. Open Run command by pressing Windows+R key, and then type REGEDIT, and hit OK. Backup your registry before modifying anything, by clicking on File menu, and then click Export. Once you are done backing up your registry, move to the following registry location.
HKEY_CLASSES ROOT/Drive/Shell
Create a new sub-key inside Shell, by right-clicking on Shell, point to New, and then click Key. Name the newly created key, RUNAS, and hit enter. From the right side pane, change the Default value to, Defragment. If you want to hide this command behind the Shift Key right-click menu, then create a new String Value inside Run As, and name it Extended.
The last step include assigning defrag command to Defragment key. For this, create a new key inside RUNAS key, and name it COMMAND. In the right side pane, change the default value to, defrag, space, %1, hyphen v. Hyphen V switch is used to see the verbose output. That’s it, and you’re done now!
To check and run your self-created command, open File Explorer, hold down Shift and right-click on any drive, and there you have the Defragment command. Clicking Defragment will run the command line version of the Disk Defragmenter.
If you want to know more about other Defragment switches, then type Defrag /? at the command prompt.
Comments
Post a Comment