Process world = new Process();
string w = Properties.Settings.Default.worldsrv;
world.StartInfo.FileName = w;
world.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
world.StartInfo.CreateNoWindow = false;
world.StartInfo.UseShellExecute = false;
world.StartInfo.RedirectStandardOutput = true;
world.Start();
StreamReader sr = world.StandardOutput;
string worldOutput = sr.ReadLine();
richTextBox1.AppendText(worldOutput + Environment.NewLine);
Sorry I should have also said that I'm redirecting the IO stream to a rich text box.
Code:Process world = new Process(); string w = Properties.Settings.Default.worldsrv; world.StartInfo.FileName = w; world.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; world.StartInfo.CreateNoWindow = false; world.StartInfo.UseShellExecute = false; world.StartInfo.RedirectStandardOutput = true; world.Start(); StreamReader sr = world.StandardOutput; string worldOutput = sr.ReadLine(); richTextBox1.AppendText(worldOutput + Environment.NewLine);
Launching the program works, just not entirely, I get back "Error in config file: cannot open file (authserver.conf)"
Well I am using a repack to test. Did you compile TrinityCore yourself? I'll try another repack and if that doesn't work I'll just compile it myself.
Oh and yeah, there is no dist
EDIT: Tried running it in administrator mode, didn't work.
Not sure what you're trying to do here: https://github.com/Neccta/TrinityCor...r/Form3.cs#L64. The program is already running, change it to "new Form1().Show();".
Oh that's because form3 should start the first time you use the program, then the bool is set to false so it doesn't show up again. But once you hit the OK button form3 would disappear, that's why I check for firstrun = true then run form 1. Oh and nice catch with the copy and paste haha.
I also tried adding world.StartInfo.Arguments = "-c worldserver.conf"; didn't seem to work. I wonder if it doesn't work just because it's in debug mode? I don't know, but it's good to hear that it'll work if it's in the same directory.