Use RunShell @GETPROCID to Later Terminate the Specific Program?

Started by mcjathan, August 04, 2015, 01:32:54 PM

Previous topic - Next topic

mcjathan

Greetings,  I have a Winbatch command that looks like this:

   Pid = RunShell(prog, params, "", @ICON, @GETPROCID)

I may have more than one instance of prog running (from different RunShell commands), but I want to be able to have Winbatch terminate the specific instance of prog associated with Pid without affecting the other instances of prog.  Is this possible?

It appears that the function AppExist() is equipped to accept Pid as an input.  However, it looks like the function TerminateApp() is NOT equipped to accept Pid as an input.  Am I misunderstanding TerminateApp()?  Or, is there some other way to terminate the specific instance of prog that is specifically associated with Pid?

Regards,  Jeff

td

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade