I'm using Apache Commons Daemon's [procrun](https://commons.apache.org/proper/commons-daemon/procrun.html) to wrap a Java application as a Windows service. The issue I am having is related to the working directory of the service which is `C:\Windows\system32`. The configuration files needed by the service are referenced relative to the application (in a `.\conf` directory).

I tried the `--StartPath` argument to `procrun` but it did not affect the service's working directory. (Update: I see now that parameter only works when starting an exe.) I am trying to keep the application cross-platform so I do not want to modify the config file paths unless absolutely necessary.

Is there a way to set a Windows service's working directory?