From b429fab878e2e9cdfbac89b40da05c62fa2ebba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89=E9=B8=AD=E8=9B=8B?= Date: Thu, 1 May 2025 19:55:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=8E=E7=A1=AE=E6=8F=90=E7=A4=BA=E5=8E=9F?= =?UTF-8?q?=E7=A5=9E=E5=90=AF=E5=8A=A8=E8=B7=AF=E5=BE=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BetterGenshinImpact/GameTask/SystemControl.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BetterGenshinImpact/GameTask/SystemControl.cs b/BetterGenshinImpact/GameTask/SystemControl.cs index 13dbca0e..8e20c4ab 100644 --- a/BetterGenshinImpact/GameTask/SystemControl.cs +++ b/BetterGenshinImpact/GameTask/SystemControl.cs @@ -17,6 +17,11 @@ public class SystemControl public static async Task StartFromLocalAsync(string path) { + if (!File.Exists(path)) + { + throw new Exception($"原神启动路径 {path} 不存在,请前往 启动——同时启动原神——原神安装路径 重新进行配置!"); + } + // 直接exe启动 Process.Start(new ProcessStartInfo(path) {