Search code examples
windowswinapivisual-c++contextmenutaskbar

Disable application taskbar icon's context menu in Windows 8.0 and 8.1


In Windows 7, 8 and 8.1, when a user right-clicks on an application's taskbar icon, a context menu appears. Furthermore, a user can right-click on the application's name again (from the context menu) and another context menu appears, as shown in this image for Windows Explorer:

image

Is there a possible way (through winapi or registry or GPO) to disable all the items in the first context menu except for "Close Window" in Win 8 and 8.1? I know that this is achieved in Windows 7 by setting the prevent pinning on the application window but it doesn't work in Windows 8 and 8.1...

If not, is it possible to show only the "Close Window" and the Application Launcher icon only in the context menu in Windows 8/8.1 without allowing the user to right-click on the application's name and display the Properties context menu?


Solution

  • I found this registry value which does the job well:

    NoViewContextMenu: https://technet.microsoft.com/en-us/library/cc960925.aspx