Old 29th September 2006, 16:02   #1
Alt2
Junior Member
 
Join Date: Sep 2006
Posts: 2
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
Alt2 is offline   Reply With Quote
Old 29th September 2006, 16:05   #2
zorphnog
Junior Member
 
Join Date: Jul 2006
Posts: 6
Remove the MessageBox command.
zorphnog is offline   Reply With Quote
Old 29th September 2006, 16:05   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 29th September 2006, 16:23   #4
Alt2
Junior Member
 
Join Date: Sep 2006
Posts: 2
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
Alt2 is offline   Reply With Quote
Old 30th September 2006, 05:28   #5
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
One of 'terminate' plug-ins http://nsis.sourceforge.net/FCT_plug-in
Takhir is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump