Search code examples
c#wpftaskbarjump-list

Manipulating taskbar right click application menu


I need to remove Application launch and "Pin this application to taskbar" from the taskbar context menu for an application. Reason is that the application cannot start standalone, it must be fed with information from another application.

Does anyone know how?


Solution

  • Ok, i found a ugly but easy solution here https://stackoverflow.com/a/3872503/1323570

    apparantly the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileAssociation\AddRemoveNames contains some words that may not exist in an executable if pinning should be possible.

    you can also read more here: http://www.west-wind.com/weblog/posts/2009/Oct/08/Application-that-wont-Pin-to-Taskbar-in-Windows-7

    Edit:

    Found the way to do it properly:

    Add the key:

    HKEY_CLASSES_ROOT\Applications\Example.exe\NoStartPage

    ref: http://msdn.microsoft.com/en-us/library/windows/desktop/hh127439(v=vs.85).aspx