Jump to content
  • Advertisement
Sign in to follow this  
Khaos Dragon

problem with simple C# launcher

This topic is 5476 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...
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();



Share this post


Link to post
Share on other sites
Advertisement
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...

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!