diff --git a/FrostyModSupport/FrostyModExecutor.cs b/FrostyModSupport/FrostyModExecutor.cs index 9a950af18..c68b0b76c 100644 --- a/FrostyModSupport/FrostyModExecutor.cs +++ b/FrostyModSupport/FrostyModExecutor.cs @@ -1787,7 +1787,21 @@ public int Run(FileSystem inFs, CancellationToken cancelToken, ILogger inLogger, try { - ExecuteProcess($"{fs.BasePath + ProfilesLibrary.ProfileName}.exe", $"-dataPath \"{modDataPath.Trim('\\')}\" {additionalArgs}"); + string steamAppIdPath = $"{fs.BasePath}steam_appid.txt"; + if (File.Exists(steamAppIdPath)) + { + string steamAppId = File.ReadAllLines(steamAppIdPath).First(); + string arguments = $"-dataPath \"{modDirName.Replace('\\', '/')}\" {additionalArgs}"; + string url = Uri.EscapeDataString(arguments); + App.Logger.Log($"Launch: {arguments}"); + App.Logger.Log($"Encoded: {url}"); + Process.Start($"steam://run/{steamAppId}//{url}/"); + } + else + { + ExecuteProcess($"{fs.BasePath + ProfilesLibrary.ProfileName}.exe", $"-dataPath \"{modDataPath.Trim('\\')}\" {additionalArgs}"); + } + } catch (Exception ex) {