LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-22-2009, 01:03 PM   #1
nano2
Member
 
Registered: May 2007
Posts: 100

Rep: Reputation: 15
kill an running application process inside windows XP


Hi,

I have the following issue where by i am trying to kill a running application that no longer is responding inside windows .
I am ssh from the my unix machine into the windows machine using a script. the script has the following :

ssh windows_machine<<EOF

for /F "tokens=2" %I in ('TASKLIST /NH /FI "WINDOWTITLE eq application"' ) DO (
SET PID=%I
ECHO %PID%
TASKKILL /F /PID %I )
TASKKILL /F /PID %PID%

EOF

can you see why sometimes the application is not been killed all the time .

the application can be launched a number of times thats why i have in the for loop.

Any ideas why it won't work ?
 
Old 09-22-2009, 02:12 PM   #2
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
i doubt the problem is with ssh
its probubly the batch file
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash `kill`: process 'B' silently dies; but process 'A' = `kill` spews back debris! GrapefruiTgirl Programming 9 06-23-2009 09:42 AM
kill process/application infinity0022 Linux - Newbie 3 03-05-2009 02:58 AM
Shell Script : Kill a running process when another process starts ashmew2 Linux - General 3 08-20-2008 03:47 AM
How to kill a process or application vitalstrike82 SUSE / openSUSE 1 02-16-2008 10:23 AM
how do i kill a process from inside a bash script? mikaelo Programming 4 05-28-2004 08:51 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration