Executing commands in console via cmd.exe process stdin

Discussion in 'BungeeCord Discussion' started by Rixterz, Sep 8, 2018.

  1. Hi,

    This is a bit of an unusual question; it doesn't relate to plugins but hopefully you can help with this issue.

    I've written a VB.NET program which starts cmd.exe with the following arguments:
    Code (Text):
    /k cd <bungeecord directory> && run.bat
    run.bat contains:
    Code (Text):

    java -Xms512M -Xmx512M -jar BungeeCord.jar
    pause
     
    I then redirect the stdin and stdout to my application, which displays the output in a textbox as expected. However, when I write to the process' stdin, nothing happens. It only works if I disable stdin redirection, and I manually type into the cmd window. Then, the commands are outputted correctly.

    Is there any way to achieve this through my program only?
     
  2. If running Linux, for example, Ubuntu, is an option, this can be done very easily, you might consider that unless you're limited to Windows.
     

Share This Page