Archive: system tray application icon issue


system tray application icon issue
1 - my appication is running
2 - i install an upgrade
3 - it asks me to quit the application to continue upgrade
4 - on clickin yes, it quits the application but the icon of the application in the system tray still remains. it disappears only on move over on that image.

i have tried using both the below mentioned commands individually and seperately.

->nsExec::Exec '"$INSTDIR\Modules\${EXE_NAME}" /quit'
->KillProcDLL::KillProc "${EXE_NAME}"


any help is highly apprecited.
thanks in advance.


Just killing a process will never remove the tray icon, but since this is your application you have full control. The easy option is to find your apps main window based on the window class and then just send it WM_CLOSE (or if you need a "harder" exit, you could handle a specific WM_APP message and just remove the tray icon and call ExitProcess)