Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 5

How to manage applications running in the taskbar notification area

I have a problem with a taskbar application that can be idle in the taskbar Notification area.

At first when doing a major upgrade or uninstall of the application when the application is idle with its icon in the Taskbar notification area, the InstallShield process did not detect that it was running.

So after reading on the web about this process, I have come to the conclusion that any application running in the background hidden by a icon in the taskbar Notification may not necessarily be detected by the Installer, you need to validate at one point during the uprade to see whether the Application is locked or not with the following function IS(FILE_LOCKED, application_path).

This has been properly implemented and works sometimes but not all the times. In some case the executable is properly overwritten in the case of an upgrade but if the application is running on the taskbar notification area. If you double click on it once the upgrade is completely done. The application that will open will be the one from the previous release. Then if you completely exit the application and exit from the taskbar notification area, then if you reexecute the application, it will then be the new application from the new release.

So my first question. Is this the best method and is there any other way to detect if an application is running in the back with its icon in the taskbar notification area?

And my second question. If for some reason, we cannot fully detect that an application is running in the back hidden by the taskbar notification area, is there a way to kill the application or exit the process that is running in the background.

thanks alot
Labels (1)
0 Kudos
(1) Reply
Level 7

We do something similar using the following code. It may work for you as well:

HWND hWndSrvMgr;

// stop status tray program
hWndSrvMg = FindWindow( "", "Window_Caption/Title" );
if hWndSrvMg != NULL then
PostMessage( hWndSrvMg, WM_CLOSE, 0, 0 ); // send message to close the program
Delay(1); // short delay
PostMessage( hWndSrvMg, WM_CLOSE, 0, 0 ); // send message again, just in case

Hope this helps.
0 Kudos