Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

C# Running batch file

$
0
0
 

Hello!

I have been working on a manager application for a Minecraft server, when i run my program, the console shows and disappears, if i run it manually, it runs without and problems. My code:

Process process = new Process
            {
                StartInfo =
                {
                    FileName = textBox2.Text,
                    //Arguments = textBox3.Text,
                    UseShellExecute = false,
                    RedirectStandardOutput = true,
                    CreateNoWindow = false,
                }
            };

            process.OutputDataReceived += new DataReceivedEventHandler(server_outputDataReceived);
server = process;
process.Start();

Batch file code (idk what language are batch files, so i used default one - Select Language):

java -Xmx1024M -jar craftbukkit-1.7.2-R0.3.jar -o false

BTW. Can you start processes without creating files ? (ex. Start process "java -jar example", without creating file) ?



Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>