Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.

Unanswered How do I unregister a Notify Icon's GUID/binary pair?

  • Monday, May 07, 2012 6:54 PM
     
     

    Per the article http://msdn.microsoft.com/en-us/library/dd940367%28VS.85%29.aspx#running:

    "Note  Notification icons specified with a GUID are protected against spoofing by validating that only a single application registers them. This registration is performed the first time you call Shell_NotifyIcon(NIM_ADD, ...) and the full path name of the calling application is stored. If you later move your binary file to a different location, the system will not allow the icon to be added again."

    Question: How do I un-register the application/path/GUID combination? Where can I clear this data so that I am free to run the application from a different path and re-register the application binary with the same GUID? It is not convenient to keep rebuilding the app. with a new GUID.


    Joe Waclawski


    • Edited by Joe Wac Monday, May 07, 2012 6:55 PM
    •  

All Replies

  • Tuesday, May 08, 2012 12:23 AM
     
     

    Hi Joe,

    There is no way provided to unregister that. If your binaries are Authenticode signed then the registration can move with the application. See the Troubleshooting section in the NOTIFYICONDATA documentation. 

    Note  The only exception to a moved file occurs when both the original and moved binary files are Authenticode-signed by the same company. In that case, settings are preserved through the move.

    Both binaries would need to be present simultaneously when the icon is created for the path to be updated.

    --Rob

  • Tuesday, May 08, 2012 1:03 PM
     
     

    Rob,

    Thanks for the info. I have some follow-up questions.

    1) In the NOTIFYICONDATA documentation, it states " If the path must be changed, the applicationshould remove any GUID information that was added when the existing icon was registered." How is removal by the application accomplished? What exactly does this mean?

    2) I have created several builds of the application now with different GUID's. Each time I subsequently run the application with the new GUID for the first time, I get a new instance of the Icon in the list under the Customize... option of the Notify Icon area (System Tray). You know, the list that gives you the option to turn ON or OFF Icons and/or Notifications. How do I purge that list?

    Thanks


    Joe Waclawski

  • Thursday, May 24, 2012 9:17 PM
     
     

    I have the same issue.  Microsoft doc tells us we must remove all references to the GUID.  So how do we do that?  We could maybe live with this in production, but in dev and test environments where we build to 32- and 64-bit targets, debug and release, and multiple branches, the exe is constantly moving.

    There's no way to manually remove the icon; there's no way to programmatically remove the icon; there's no way to get work done.

    Weren't much of a plan....

  • Friday, May 25, 2012 12:45 AM
     
     

    Try to close Explorer and restart it.

    -- pa