I am trying to kill a process using SYS_Execute()calling SysInternals' PsKill.exe.
This works when I use the absolute path to PsKill but not when I use its relative path.
Could anyone tell me if it is possible to do this (perhaps there's a step I'm missing)?
I'm confident that my absolute path is correct since I'm successfully using it in "use" statements referencing .inc files.
Thanks, Chris. This works, but only some of the time. I'm still trying to get this to work correctly; having a little problem I think because the function to start the process is in the same include file? Or it could be due to starting the process via a SYS_Execute start shortcut call. In any case, sometimes the app will start and sometimes it will shut down via calling the functions. Eventually both will work...
I don't think that the include file details are the problem. Using a shortcut is one of the most reliable and predictable ways to get something invoked using SYS_Execute, so I wouldn't blame it. What is your relative path relative to? I think that with SYS_Execute the default directory might be C:\Program Files\Segus\SilkTest or maybe C:\Windows\System32. Are you using the name or pid with pskill? What does pskill do if you give it a name and there are two processes with that name running?
I am actually not 100% sure if I understand what the error is.
Chris R Mead
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.