Archive: Close Running File


Close Running File
  anyone please know a way to cloes/kill a Running file.exe
or is there a command to cloes a running file?
i searched and read the doc. but i didnt find any

i do not want to use the findwindow or class way becasue the file have many classes and no window title and it is hard to search for all the classes that the program use


CloseWinamp

Push$0
loop:
FindWindow $0 "Winamp v1.x"
IntCmp $0 0 done
SendMessage$0 16 0 0
Sleep 100
Goto loop
done:
Pop $0
FunctionEnd
>
or

CloseApplication

Pop$1
Push$0
loop:
FindWindow $0 $1
IntCmp$0 0 done
SendMessage$0 16 0 0
Sleep 100
Goto loop
done:
Pop $0
FunctionEnd

>Function .onInit
Push "Winamp v1.x"
Call CloseApplication
FunctionEnd
>
and killing the file.exe is alot easier
thank you

When you say classes, do you mean the registered window class? Generally a program would only register 1 class name. Use something like windows spy to figure it out.


hi :D
yes i mean the registered window class

Example: The windows Messenger use alot of classes ,these are some :

SipSocketWindowClassName-8b6971c6-0cee-4668-b687-b57d11b7da38
MSGSHotmailSP
MSBLGeneric
MSGSBlObj
MSBLUIManager
OleDdeWndClass
HiddenWindowClass
#43
WorkitemCompletionWindowClass-0ade6260-d1b4-483a-ae9d-42277907e898
370
SysHeader32
CRTCClient
Button
Internet Explorer_Hidden
MSBLClass
OleDdeWndClass
tooltips_class32
CRTCIMService
WorkItemWindowClass-c4572861-a2f6-41bd-afae-92538b59267b

i found that a class"MSBLClass" will close the messenger front window
and another one "HiddenWindowClass" will close the messenger from the systray

but the messenger will still run in background.:eek:
so useing class are not a wise choise.:down:

i used spy, tdwininfo, win32spy, WindowFinder_demo
and the best one is "Microsft Spy++" :up: but
:cry: not every program can be closed by a class.

Thank You

hey you, share the End process code
:D