From baa37262fe1c0719670c08d4ef3aa0c20635597b Mon Sep 17 00:00:00 2001 From: Float3 <86748455+Float3@users.noreply.github.com> Date: Sun, 8 May 2022 23:12:08 +0200 Subject: [PATCH] check if Override Path points to folder or exe --- AppApi.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AppApi.cs b/AppApi.cs index 50317626..918f90b4 100644 --- a/AppApi.cs +++ b/AppApi.cs @@ -183,10 +183,11 @@ namespace VRCX public void StartGameFromPath(string path, string arguments) { + if (!path.EndsWith(".exe")) path = Path.Combine(path, "VRChat.exe"); Process.Start(new ProcessStartInfo { - WorkingDirectory = path, - FileName = $"{path}\\VRChat.exe", + WorkingDirectory = Path.GetDirectoryName(path), + FileName = path, UseShellExecute = false, Arguments = arguments }).Close();