AutoHotkey Community

It is currently May 27th, 2012, 12:34 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: December 19th, 2009, 10:27 pm 
I'm trying to close/kill a running application.

Can anyone advise how to do this ??

I've tried:
Quote:
Runwait, %comspec% /c "telnet 10.0.0.1 -f log.txt",,hide
Sleep 1000
Process, Close, telnet.exe


But that doesn't work.
I have tried winclose & winkill, but I don't seem to be able to get to work either..

Thanks :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 19th, 2009, 11:29 pm 
Hmm.. got it working using:

Code:
appList = Telnet.exe
Loop, Parse, appList, `,, % A_Space
{
   count++
   appList%A_Index% := A_LoopField
   Loop,
   {
      Process, Exist, % appList%count%
      If !ErrorLevel = 0
         Process, Close, % ErrorLevel
      Else
         Break
   }
}

Thanks to the original poster for that code..

But it seems a lot just to kill one process.. Any ideas ?
Thanks :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 23rd, 2009, 11:29 am 
Use "taskkill " in a batch file: http://www.microsoft.com/resources/docu ... x?mfr=true


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 23rd, 2009, 2:58 pm 
I use pskill - part of pstools.

Works really well[/quote]


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], chaosad, Exabot [Bot], jrav and 23 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group