I'm pretty new to C#, I've messed around with it before but I really want to get to know it now.
I want to make an outside console application for a game, the game is a bad port and it requires a lot of programs to be open in the background to make it more playable. So I decided to make a program that replaces the launcher.exe with one that launches all the programs when the game starts and closes them when the game closes.
The game is BioShock 2 to be exact, but I'm most likely going to make this program so I can use it with other games that could make use of this program too.
Here's my problem though, when I start the debug it'll open up one of the programs to help the game (FlawlessWidescreen) but the game itself won't open.
I've tried just running BioShock2 but it shows it running for a quick second and then closes, no errors so I can't exactly figure out what I'm doing wrong.
Here's my code.
public class SecurityException : SystemException
static void Main(string args)
Process.Start("F:\\Steam Library\\steamapps\\common\\BioShock 2\\SP\\Builds\\Binaries\\FlawlessWidescreen.lnk");
Process.Start("F:\\Steam Library\\steamapps\\common\\BioShock 2\\SP\\Builds\\Binaries\\Bioshock2.exe");
Fixed it by using the WorkingDirectory.
ProcessStartInfo bioshock2Info = new ProcessStartInfo(); bioshock2Info.FileName = (@"F:\Steam Library\steamapps\common\BioShock 2\SP\Builds\Binaries\Bioshock2.exe"); bioshock2Info.WorkingDirectory = Path.GetDirectoryName(@"F:\Steam Library\steamapps\common\BioShock 2\SP\Builds\Binaries\Bioshock2.exe"); Process bioshock2 = Process.Start(bioshock2Info);