Archive: How to check running application


How to check running application
Hi folks,

I have developed nsi installer for my application. In the installation process I am copying FrameMaker plugin into FrameMaker directory. I need to check whether the FrameMaker is running or not before copying the plugins. If the FM is open then I should stop the installation and give a warning to close the application.

I found this code from NSIS for uninstallation:

/* Replace the values of the two defines below to your application's window class and window title, respectivelly. */

!define WNDCLASS "WindowClassOfYourApplication"
!define WNDTITLE "WindowTitleOfYourApplication"

Function un.onInit
FindWindow $0 "${WNDCLASS}" "${WNDTITLE}"
StrCmp $0 0 continueInstall
MessageBox MB_ICONSTOP|MB_OK "The application you are trying to remove is running. Close it and try again."
Abort
continueInstall:
FunctionEnd

I need the values of two defines for the FM application to check whether it is running or not.

Please help me in this regard. Is there any other solution to solve this problem?

Thank you in advance


Get WinSpy++ 1.7

http://www.catch22.net/software/winspy.asp


Thanks a lot! Tried and it is working now..