Skip to content
⌘ NSIS Forum Archive

Detect and close 16-bit application

3 posts

cchian#

Detect and close 16-bit application

I am trying to automate a specific 16-bit application update and need to find a way to detect and close it first if running.

The following code works, but I am afraid the code below "ThunderMDIForm" can also affect other "similar" VB applications that may also be running.

Thanks,


Function CloseMyApp
Push $0
loop:
FindWindow $0 "ThunderMDIForm"
IntCmp $0 0 done
MessageBox MB_OK "Please, close MyApp!"
## SendMessage $0 16 0 0
Sleep 300
Goto loop
done:
Pop $0
FunctionEnd
Takhir#
If you know 'fixed' part of ThunderMDIForm window caption (title) you can use FindCloseTerminate plug-in, it checks both window class and caption.