LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
 
LinkBack 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,208

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are 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/Novell 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


All times are GMT -5. The time now is 03:31 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration