Jump to content

Remove Icon/Listing from Notification Area (Windows)


Recommended Posts

So I have this program that when it is uninstalled it leaves behind the entry in Notification Area Icons (Screenshot Attached)

How can I go about getting this removed?

I can shotgun blast it like this with cmd:

taskkill /im explorer.exe /f
reg delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v IconStreams /f
reg delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v PastIconsStream /f
start "Shell Restarter" /d "%systemroot%" /i /normal explorer.exe

But I am looking for a more precise method of finding and eliminating, preferably without killing explorer or rebooting if possible. 

post-86705-0-89386500-1427987288_thumb.j

Link to comment
Share on other sites

you need to refresh the explorer's tray cache in order to that list refresh its contents...

maybe there's a special hook you can use, IDK

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Link to comment
Share on other sites

Try with this code :

_RefreshTray()

Func _RefreshTray()
    Local $hTray = ControlGetHandle("[CLASS:Shell_TrayWnd]", "", "[CLASS:ToolbarWindow32]")
    If @error Then Return
    
    Local $aOldPos = ControlGetPos("[CLASS:Shell_TrayWnd]", "", $hTray)
    Local $aPos = $aOldPos
    
    While 1
        For $x = 0 To $aPos[2] Step 5
            DllCall("user32.dll", "int", "SendMessageW", "hwnd", $hTray, "int", 0x200, "int", 0, "int", 0x10000 + $x)   ; WM_MOUSEMOVE
        Next
        $aPos = ControlGetPos("[CLASS:Shell_TrayWnd]", "", $hTray)
        If $aPos[2] = $aOldPos[2] Then ExitLoop
        $aOldPos = $aPos
    WEnd
EndFunc

Works for me with Windows 7 x64

Link to comment
Share on other sites

I'll try that tomarrow when I get back to work thanks jguinch.

I was looking at some of the task/tray UDF we had so far nothing has worked but I have confidence that this will :)

If not I'll just tell the application team to use the regdelete and let it go away upon reboot.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...