Setting environment variables on WinRM startProcess
wmunyan opened this issue · comments
When starting a process locally, I could get/set environment variables through the ProcessBuilder
:
// create a ProcessBuilder for the command
ProcessBuilder pb = new ProcessBuilder(command);
// set the process environment variables...
Map<String, String> env = pb.environment();
env.putAll(myEnvironmentVars);
Are there any methods to do this via my WinRM connection? I see a ProcessBuilder
being created in a LocalConnection
, but it doesn't seem like I can manipulate it to set environment variables. Otherwise, I'm not seeing anything jumping out at me for remote connections.
Thanks for any help!