CGAnimator Posted November 22, 2007 Posted November 22, 2007 i want to close a process , if i used processclose ("name") it's not working i need to force the process to be closed , like winkill . thanx in advance
Baloven Posted November 22, 2007 Posted November 22, 2007 If it is necessary for you to close process it is necessary to use ProcessClose ("process" [, flag]) where "process" - a name of an executed file (as a rule)... See <Program Files Dir>\AutoIt3\AutoIt.chm ... ProcessClose ( "process" [, flag] ) Parameters process The title or PID of the process to terminate. flag [optional] if different from zero will force closing of handles to child stream if any defined in the Run() execution. process must be defined as a PID.
mikiutama Posted November 22, 2007 Posted November 22, 2007 (edited) #include <Constants.au3> $run = Run("taskkill /F /T /IM processnametokill.exe", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $line = StdoutRead($run) If @error Then ExitLoop MsgBox(0, "Sucessfull:", $line) Wend While 1 $line = StderrRead($run) If @error Then ExitLoop MsgBox(0, "Error:", $line) WEnd Edited November 22, 2007 by mikiutama ashraful089 1
CGAnimator Posted November 22, 2007 Author Posted November 22, 2007 Thanx alot Baloven for the advice thanx alot mikiutama for the new way it works fine
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now