I'm new to programming and C#, I am attempting to write a program that detects errors or server crashes from my battlefield 2 server, it will then shut the server down (if the server is not already down) and start it back up but I have ran in to a small bump. When I try to start battlefield 2 back up again I receive this error from bf2:
Debug assertion failed! Version 1.0.2446.12 Build date:
Module: Python
File: c:\dice\Projects\BF2Branches\BF2Demo\Code\BF2\Game\Python\PythonHost.Cpp
Line:243Text: couldn't import the bf2 module:
Current confile:
The path in the error doesn't exist.
I have researched a couple different ways to start up an application but they all have the same results. These are a couple I have tried so far:
Process proc = new Process();
proc.StartInfo.FileName = @"txtServerPath.Text";
proc.Start();
and
Process.Start(txtServerPath.Text);
When I manually start the bf2 Server it starts fine. So what am I doing wrong?
My program will be ran from both Windows Server 2003 and Windows 7 if that matters.