Optimizing your PC's internal disk drive is a very important process which improves your PC's performance. In this article, we will see how to add "Optimize Drives" to the drive context menu in Windows 10.
Advertisеment
Out of the box, Windows 10 performs disk defragmentation once a week for hard drives and SSD TRIM operation for SSDs. During active use, hard drive performance suffers due to file system fragmentation which notably slows down the access time. SSDs have very fast access times for data stored in any part of the drive and do not need to defragmented but they need to be sent a TRIM command which tells the SSD controller to erase unused blocks which are no longer in use, so that when the time comes to actually write new data to those blocks, performance isn't affected.
Tip: See how to optimize drives by schedule in Windows 10.
Modern Windows versions are smart enough to pick the right optimization method and time period depending on your drive specifications. If you need to optimize drives manually, you may want to add the Optimize drives command to the drive context menu. Here is how it looks:
It opens the following dialog:
This can be done with a simple Registry tweak or using the Context Menu Tuner app. Before proceeding, ensure that your user account has administrative privileges. Now, follow the instructions below.
To add the Optimize Drives context menu in Windows 10, do the following.
- Open the Registry Editor app.
- Go to the following Registry key.
HKEY_CLASSES_ROOT\Drive\shell
See how to go to a Registry key with one click.
- Here, create a new subkey named "dfrgui". See the following screenshot:
- On the right, create a new string value MUIVerb and set its value data to the line "Optimize drives".
- On the right, create a new string parameter named Icon and set its value data to dfrgui.exe.
- Under the HKEY_CLASSES_ROOT\Drive\shell\dfrgui key you created, create a new subkey named command as shown below.
- Set its default parameter to the line dfrgui.exe. See the following screenshot.
- Open File Explorer.
- Navigate to the This PC folder.
- Right click any drive. You will see your context menu.
To save your time, you can download these ready-to-use Registry files. The undo tweak is included:
There is a special Ribbon command "Optimize" which opens the Optimize Drives dialog from This PC. We can add to the context menu.
The easiest way to add any Ribbon command to the context menu is to use Winaero's Context Menu Tuner. It has an easy-to-use interface and will allow you to add any command you want to the right-click menu. The command is called "Windows.Defragment". See the following screenshot:
Do the following.
- Download Context Menu Tuner.
- Select the History command on the left as shown above.
- Select "Drive" on the right.
- Double click the Windows.Defragment item on the left. It will be added to the drive context menu. See the screenshot:
That's it.
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!
Advertisеment
I REALLY need this! I’m going to kiss you
Sounds not bad :-)
Great tip!!
Would there be a way to automatically trim the SSD when clicking the “optimize drive” command?
Ya know, right click on the drive or even a blank space on the desktop and click optimize drives and it sends the command to the pc to trim the drive without any other input from the user?