As you probably know, right-clicking on your desktop or on any explorer window opens up a contextual menu with options such as copy and paste, properties and so on.
For security reasons, some system administrators prefer having the ability to right-click disabled.
Disabling right-clicking on the desktop is quite simple. Here’s how you do it:
- Open Regedit by writing “regedit” on the search bar, or by pressing the Windows Key + R, writing “regedit” and pressing enter.
- Scroll down to the following registry key, or, if you can’t find it, create it: HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer
- In the right side, create a new DWORD value named NoViewContextMenu within the aforementioned registry key. Set its data value to 1 to disable right clicking or 0 to enable it. You can also delete the DWORD value you created in order to enable right clicking.
- Reboot your computer to apply your changes.
You can also implement all of the above by creating and executing a .rag extension file containing the following:
Disabling Right Clicking on the Taskbar
The previous steps only allow you to prevent right clicks on the desktop and on the explorer windows.
If you want to disable right clicks on the taskbar, you need to do the following:
- Open Regedit by following the previous steps.
- Scroll down to the following registry key or create it: HKEY_LOCAL_MACHINESoftwareMicrodoftWindowsCurrentVersionPoliciesExplorer
- Create a new DWORD value named NoTrayContextMenu and set its data value to 1 to disable right clicks on the Windows taskbar. Revert it back to 0 if you want to reenable it. You can also delete the DWORD value to revert the changes.
- Reboot your computer to apply the changes you’ve made.
If you’ve done everything properly, the ability to right click should be disabled on your desktop, explorer windows, and taskbar. Be careful not to delete or change anything else while in Regedit, because you can damage your computer.
Petr is a serial tech entrepreneur and the CEO of Apro Software, a machine learning company. Whenever he’s not blogging about technology for itechgyan.com or softwarebattle.com, Petr enjoys playing sports and going to the movies. He’s also deeply interested about mediation, Buddhism and biohacking.