Skip to content
⌘ NSIS Forum Archive

KIll Process Question

5 posts

Alt2#

KIll Process Question

Hi, quick question I using this code to kill application on uninstall:

Function un.CloseMyApp
Push $5
loop:
FindWindow $5 "" "${PRODUCT_NAME}"
MessageBox MB_OK "FOUND $5!!"
IntCmp $5 0 done
SendMessage $5 16 0 0
Sleep 100
Goto loop
done:
Pop $5
FunctionEnd

and works fine but then comes 3-4 prompts FOUND 145232 etc. how can I disable those messages?

Thanks in advance,
Alt2
kichik#
Exit the loop once you find a window and send WM_CLOSE to it. Unless you're trying to exit multiple instances, there's no need for that.
Alt2#
When I removed messageBox but then stop and didn't exit application, also I am not good with NSIS script. Can you kichik correct code as supposed to work?

Thanks guys.

Alt2