Sikuli doesn't kill the CMD process in Windows after running the script is done

Asked by Zoran Lisovac

Hi,
I run a sikuli test from a .bat file, which looks like this:
"C:\Documents and Settings\Administrator\Desktop\sikuli\runIDE.cmd" -r "C:\Documents and Settings\Administrator\Desktop\SikuliTests\MySikuliScript.sikuli"

and everything works nicely, the script is run, sikuli does the tests etc, and the command prompt is closed after the tests are done. However, the window is just closed, but the process is still active. Is there a way to tell sikuli to actually kill the process when it's done? Not just 'close' the cmd window? I'm very dependent on this, as I do some variable resetting in my C# code:

var process = Process.Start("runTests.bat")

and I plug in into process.Exited event provided by .NET, to do some variable resetting.
So is there a way to achieve this?

As a follow up question, if I start sikuli from C# code, like above, is there any way to know when the sikuli will finish its tests, aside from events provided by Process class in .NET ? I know sikuli runner and the C# code in this case are totally independent, but still, is there a way to achieve this?

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

--- Sikuli doesn't kill the CMD process
Sikuli has nothing to do with that.
This is all Windows batch processing from inside another batch file.

If you want more control, use the java command directly (see runIDE.cmd):

java -jar sikuli-script.jar -r yourscript.sikuli

Can you help with this problem?

Provide an answer of your own, or ask Zoran Lisovac for more information if necessary.

To post a message you must log in.