Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Adding my app's link to Desktop Context Menu

Adding my app's link to Desktop Context Menu

Scheduled Pinned Locked Moved C#
questionwindows-adminhelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sumit Prakash Sharma
    wrote on last edited by
    #1

    When you right click on the desktop you get a context menu that has something like that: ----------------------- Arrange Icons By Refresh ----------------------- Paste Paste Shortcut ----------------------- New ----------------------- Properties ----------------------- I need to add a link to my application on Desktop's context menu. How can I accomplish that? What registry key do I need to modify/add to get my app icon listed on the desktop context menu? E.g.: --------------------------- Arrange Icons By > Refresh --------------------------- My App Link > Paste Paste Shortcut --------------------------- New --------------------------- Properties --------------------------- Please help. Thanks.

    L 1 Reply Last reply
    0
    • S Sumit Prakash Sharma

      When you right click on the desktop you get a context menu that has something like that: ----------------------- Arrange Icons By Refresh ----------------------- Paste Paste Shortcut ----------------------- New ----------------------- Properties ----------------------- I need to add a link to my application on Desktop's context menu. How can I accomplish that? What registry key do I need to modify/add to get my app icon listed on the desktop context menu? E.g.: --------------------------- Arrange Icons By > Refresh --------------------------- My App Link > Paste Paste Shortcut --------------------------- New --------------------------- Properties --------------------------- Please help. Thanks.

      L Offline
      L Offline
      Luc 648011
      wrote on last edited by
      #2

      Hi, There are several ways to do it, here is one using the RegistryKey classes:

      // create 2 registry entries to get an entry in the Explorer context menu for all files and folders:
      // (replace AllFilesystemObjects by * for files not folders)
      // HKEY_CLASSES_ROOT\AllFilesystemObjects\Shell\appname.ContextMenu:
      // (Default) Open using myApp
      // HKEY_CLASSES_ROOT\AllFilesystemObjects\Shell\appname.ContextMenu\Command:
      // (Default) apppath "%1"

      you would need admin privileges to do this. :)

      modified on Friday, April 10, 2009 9:34 AM

      S 1 Reply Last reply
      0
      • L Luc 648011

        Hi, There are several ways to do it, here is one using the RegistryKey classes:

        // create 2 registry entries to get an entry in the Explorer context menu for all files and folders:
        // (replace AllFilesystemObjects by * for files not folders)
        // HKEY_CLASSES_ROOT\AllFilesystemObjects\Shell\appname.ContextMenu:
        // (Default) Open using myApp
        // HKEY_CLASSES_ROOT\AllFilesystemObjects\Shell\appname.ContextMenu\Command:
        // (Default) apppath "%1"

        you would need admin privileges to do this. :)

        modified on Friday, April 10, 2009 9:34 AM

        S Offline
        S Offline
        Sumit Prakash Sharma
        wrote on last edited by
        #3

        Thanks i am already know this that. but i want to know how to add shortcut on desktop context menu, so that whenever user perform right click on desktop, my application's shortcut should be visible. please help me

        L 1 Reply Last reply
        0
        • S Sumit Prakash Sharma

          Thanks i am already know this that. but i want to know how to add shortcut on desktop context menu, so that whenever user perform right click on desktop, my application's shortcut should be visible. please help me

          L Offline
          L Offline
          Luc 648011
          wrote on last edited by
          #4

          I am unaware of a registry key supporting the desktop context menu. There must be ways to do it programmatically, sending some Windows messages to the desktop Window, it is a simple ListView after all. However I don't know any details, never saw it, never needed it. :)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups