1

I have sth.bat file which launches my java program on computer 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, I'm 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?

0

2 Answers 2

1

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 taskkill command for a remote kill.

tasklist /v command reveals window titles.

1

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

You must log in to answer this question.