From 2749fa6cfb8b30a2f7eedea2acd77c423f71609a Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Sun, 4 Aug 2024 20:39:26 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B8=85=E7=90=86=E8=B7=A8=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=9E=83=E5=9C=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/ViewModels/UI/VersionUpdateViewModel.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/MaaWpfGui/ViewModels/UI/VersionUpdateViewModel.cs b/src/MaaWpfGui/ViewModels/UI/VersionUpdateViewModel.cs index 7ce24fc564..21401696ab 100644 --- a/src/MaaWpfGui/ViewModels/UI/VersionUpdateViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/VersionUpdateViewModel.cs @@ -229,6 +229,17 @@ namespace MaaWpfGui.ViewModels.UI const string CmdFileContent = "@echo off\r\nif exist MAA.exe (\r\n ren MAA.exe MAA_v5.exe\r\n)\r\nstart \"\" .\\MAA_win7.exe"; File.WriteAllText("启动旧版.cmd", CmdFileContent); } + else + { + if (File.Exists("MAA_win7.exe")) + { + File.Delete("MAA_win7.exe"); + } + if (File.Exists("启动旧版.cmd")) + { + File.Delete("启动旧版.cmd"); + } + } string removeListFile = Path.Combine(extractDir, "removelist.txt"); if (File.Exists(removeListFile))