Skip to content

Run game application from a code

Soap McTavish

Asked Nov 22, 2008, 1:29 PM EST1 answer
Share
LinkedInX
Hey guys, I'll try to be straight: Got an C# application and I have a path to Call of Duty 4 game (for example, C:\blabla\iw3mp.exe), but it's not working. I use Process.Start(path) (or @path), but everytime I got error which says almost everytime totally different exceptions... I dont have any clue what the problem could be, it's just double click on icon from my view...

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • +1
    Found solutions myself :) You need to use System.Diagnostics.ProcessStartInfo xxx = new ProcessStartInfo(@FilePath); xxx.WorkingDirectory = DirectoryPath System.Diagnostics.Process.Start(xxx); Note that I've found this at blogs.msdn.com, first time in my life this was the one, and the only page with working solution I've found so far :D
    +1