System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.FileName="C:\\Documents and Settings\\Michael\\My Documents\\Visual Studio Projects\\ecoplayground_launcher\\EcoPlaygroundOGL\\ecoplayground.exe";
proc.Start();
problem with simple C# launcher
Beware, this is my first real C# project.
I am writing a quick C# launcher which basically allows you to select via combo boxes the type of screen mode used, whether to use openGL or direct3D as the render, and a few other options, as well as a button titled launch.
Anyways that is not the important part...what is important is that when the user presses launch, it needs to open the executable. It seems to do this since it opens up a new window, but then it promptly crashes right afterwards for no reason. (The executable works fine if you simply double click on its icon).
Edit: also, it would cool if I could possibly pass command line arguments to the executable as that would be a way to pass the screen resolution to use
The following is what I use to launch the executable...
I will bump once since I posted real late last night and that may be why I haven't got any responses, but if no one can help me here, I will submit that this may actually be a difficult problem...
Check the starting directory that the executable should point to. If it's using relative paths to get there, chances are it's running from the current path and thus not finding it's resources. (art, etc)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement