kill application remotely

i have sth.bat file which launches my java program on compu─▒ter A.

i start this application from computer B by using "psstart \computerA "c:\sth.bat" ".

but i when it comes to kill it in the same way, im limited with the process name. Because when sth.bat is run, i see a cmd.exe and java.exe in process list.

I have to use the process name with "pskill \computerA processName". But i have more than one applications named cmd.exe and java.exe.

How can i solve this problem?

Answers


Look at calling psexec from sysinternals and doing a tasklist and and kill via that.


you could try the start command in your sth.bat to start your java program, this allows you to specify a window title which you can supply to the ms taskkill command for a remote kill.

tasklist /v reveals window titles


Need Your Help

restart (or reload the config of) Eclipse-CS programmatically

eclipse checkstyle

I am trying to reconfigure the CheckStyle plugin for Eclipse (Eclipse-CS) from code (while Eclipse is running). So far the only way I have found to do this is by replacing the XML file with the con...

Maven project doesn't put files in src/main/resources on classpath

java eclipse maven classpath

I have a java project in Eclipse. I want a read file that is in a certain folder. I use this code: