I have a .bat file that launches a command, I would like to do away with using a .bat file and programmatically start the process in C#.
Here is the .bat command line
start ShooterGameServer.exe TheIsland?QueryPort=27015?SessionName=ARKServer?MaxPlayers=5?listen?ServerPassword=55555?ServerAdminPassword=55555 -nosteamclient -game -server -log
I tried setting it up like this in C#
Process.Start("CMD.exe", string.Format("Start {0} TheIsland?QueryPort=27015?SessionName?{1}?MaxPlayers={3}?listen?ServerPassword={2}?ServerAdminPassword={2} -nosteamclient -game -server -log", ArkServer.FileName, textBox1.Text, textBox2.Text, numericUpDown1.Value.ToString()));
All I end up with after running that command in C# is a cmd window with this printed on it
C:\Users\*******\Documents\Visual Studio 2013\Projects\ArkProfileEditor\ArkProfi
leEditor\bin\Debug>