How to close a running task (aka process)
I'd like to be able to close a running process (i.e: this might be my own app that I'm about to update).
Is that possible with NSIS?
bEST REGARDS
Roberto Dalmonte
Archive: How to close a running task (aka process)
How to close a running task (aka process)
I'd like to be able to close a running process (i.e: this might be my own app that I'm about to update).
Is that possible with NSIS?
bEST REGARDS
Roberto Dalmonte
That really depends on the application you are trying to close. Some will close when you send their main window WM_CLOSE such as Winamp 1 and 2 for example:
loop:
FindWindow $0 "Winamp v1.x"
IntCmp $0 0 startCopy
SendMessage$0 ${WM_CLOSE} 0 0
Sleep 100
Goto loop
>
Services need a special API call (ControlService). You can use the NET command line utility for services.Thanks, this is what I was looking for.
Roberto
This is, I guess, the most simple example of closing a running window. The following script will terminate notepad.
SilentInstall silent
OutFile "CloseNotepad.exe"
Section "MySection"
FindWindow $0 "Notepad"
SendMessage $0 16 0 0
SectionEnd
Hello, I'd like to end a process but it doesn't necessarily have a frame and could be running in the background.... I want to kill any running internet explorer processes so that I can install a browser dependant program. seems IE is running in the background in some cases, and I need to end these processes before I can register my dll or I get an error when upgrading the dll.
Is this possible?
Hope someone can help.:(
thanks in advance :D
Sorry, I don't know how to accomplish that. I tried different things without success.
If I happen to succeed sooner or later I'll let you know
robdal@tiscali.it
KiCHiK posts his email adress in separate parts, and you should do that too to avoid Spambot's to pick up your email adress and send you a mailbox full of spam.
Like this:
robdal at tiscali dot it