locked
C# Running batch file RRS feed

  • Question

  • 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) ?





    • Edited by mibac138 Monday, April 14, 2014 7:17 PM
    Monday, April 14, 2014 6:57 PM

Answers

  • Hi micbac138,

    The topic of this forum is Microsoft Project customization and programming - sadly - not a general purpose forum for programming.

    Try re-posting to: http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral

    • Marked as answer by mibac138 Monday, April 14, 2014 7:33 PM
    Monday, April 14, 2014 7:26 PM

All replies

  • Hi micbac138,

    The topic of this forum is Microsoft Project customization and programming - sadly - not a general purpose forum for programming.

    Try re-posting to: http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral

    • Marked as answer by mibac138 Monday, April 14, 2014 7:33 PM
    Monday, April 14, 2014 7:26 PM
  • Sorry, and thanks! :)

    BTW. mibac138, not micbac138 :P

    Monday, April 14, 2014 7:31 PM
  • No worries and sorry for the misname :-)
    Monday, April 14, 2014 7:38 PM