Greetings,
I'm doing some very basic
testing and finding an interesting problem. After hours of Google research and checking around here, I'm still unable to come up with a solution.
Here's some of the testing code I've been playing with:
The ultimate goal is to interactively work the command. WMIC is a Windows command since XP Pro. If you do not pass any parameters, it will keep you in a shell so you can continually execute commands and receive output each time. It seems like no matter what I do, the only way it will work is to close the input stream. I've tried appending some \r\n, \0, \u0000 to the
string being passed and flushing but it doesn't work.
What am I missing? This works in PHP but my usage of ProcessBuilder and interactive streams is pretty low. I've spent a few days trying to get this to work as expected.
If I can't get this to work interactively then 1) I'll be sad to walk away without understanding how to do it, 2) I'll have to set it up in a loop to run the command about 40 times to get everything I need. Mostly, #1 is why I'm still working at this.
Thanks!
--Sean