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.
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.
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.
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:
Add the Optimize Drives context menu with Context Menu Tuner
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: