grzech
7th December 2006 07:41 UTC
Find if my application is running and if so send WM_CLOSE to it
Hi all,
Before starting instalation or uninstalation I would like to check if my program is already running and if so close it. Normally I would do it by calling FindWindow and sending WM_CLOSE message to it.
How can I do it from NSIS Installer?
Thank you.
bholliger
7th December 2006 09:18 UTC
Have a look at the wiki:
http://nsis.sourceforge.net/Close/exit_a_program
Cheers
Bruno
grzech
7th December 2006 10:24 UTC
Thanks, that looks exactly what I need. :)
Swapan Das
8th December 2006 11:09 UTC
For your further reference, you can try this also:
Function .onInit
; ------ At the time of installation Check if already MyProg.exe running:
FindProcDLL::FindProc "MyProg.exe"
StrCmp $R0 1 0 +3
MessageBox MB_ICONINFORMATION|MB_OK "Please Exit from MyProg program and then re-run this Installer"
Quit
FunctionEnd