← Back to team overview

sikuli-driver team mailing list archive

[Bug 1813494] Re: [1.1.4] Windows: Working dir not set

 

When you do:

App app =  new App("C:\\Path\\to\\runnable.exe");
app.open();

This triggers a cmd execution to Windows, like:

cmd /C start "" /B "C:\Path\to\runnable.exe"

Problem is this cmd command seems to be run inside a default directory
or inheriting java's user dir, not sure exactly. As in, the current
working dir for the commandline. Which one would change with the cd
command.

Nevertheless what I would expect is the command to be run inside of the
folder where the executable is or optionally specify where the current
dir should be for the command.

One could do this using the processBuilder.directory(File file) method,
as I see you are using the ProcessBuilder class in the
org.sikuli.util.ProcessRunner class.

It is important because some processes use relative paths to their
working directory. I've encountered some that just plain refuse to run
without the current working directory being set in a particular way.

I hope my explanation is helpful.

Cheers!

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1813494

Title:
  [1.1.4] Windows: Working dir not set

Status in Sikuli:
  In Progress

Bug description:
  With an App object created with the path to an executable.

  When doing app.open().

  The working directory for the process is not set, hence causing some
  processes to be unable to run or function properly.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1813494/+subscriptions


References