From 42af5f0939dcccac5eb52792c58377870238dfdd Mon Sep 17 00:00:00 2001 From: penev92 Date: Thu, 21 May 2015 21:15:42 +0300 Subject: [PATCH] Fix how OpenRA.exe launches OpenRA.Game.exe --- OpenRA.GameMonitor/GameMonitor.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenRA.GameMonitor/GameMonitor.cs b/OpenRA.GameMonitor/GameMonitor.cs index 6f968047eb..bbf9c74aea 100644 --- a/OpenRA.GameMonitor/GameMonitor.cs +++ b/OpenRA.GameMonitor/GameMonitor.cs @@ -9,9 +9,9 @@ #endregion using System; -using System.Collections.Generic; using System.Diagnostics; using System.Drawing; +using System.IO; using System.Media; using System.Reflection; using System.Windows.Forms; @@ -20,12 +20,14 @@ namespace OpenRA { class GameMonitor { - static string processName = "OpenRA.Game.exe"; static Process gameProcess; [STAThread] static void Main(string[] args) { + var executableDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + var processName = Path.Combine(executableDirectory, "OpenRA.Game.exe"); + var psi = new ProcessStartInfo(processName, string.Join(" ", args)); try