I'm writing a small program which is to be used as a digital distribution platform for a specific game engine.
This game engine has versions which are quite old and this seems to be causing some compatibility issues.
Running a particular game seems to work fine if i run it directly from explorer (i.e dbl clicking the exe) but if I run it as a process from within my program it crashes out immediately.
So whats the difference between a process in .NET and just running it from the shell?
heres my current code:
(For the record this version of the engine does not need dosbox, so its not dosbox that is screwing up.)
if (Status == "Ready")
{
System.Diagnostics.Process Proc = new System.Diagnostics.Process();
if (NeedsDosBox)
{
Proc.StartInfo.FileName = String.Format("{0}\\dosbox.exe", Globals.AppDir);
Proc.StartInfo.Arguments = String.Format("{2}\\{0}\\{1}", GameId, Executable, Globals.Gamecache);
}
else
{
Proc.StartInfo.FileName = String.Format("{2}\\{0}\\{1}", GameId, Executable, Globals.Gamecache);
}
Proc.StartInfo.UseShellExecute = true;
Proc.EnableRaisingEvents = true;
Proc.Exited += new EventHandler(Proc_Exited);
Status = "In Game";
Proc.Start();
}