Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting environment variables on WinRM startProcess #196

Open
wmunyan opened this issue Mar 13, 2017 · 0 comments
Open

Setting environment variables on WinRM startProcess #196

wmunyan opened this issue Mar 13, 2017 · 0 comments

Comments

@wmunyan
Copy link

wmunyan commented Mar 13, 2017

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant