From 0f62cee7e4ada9ab52137bf3e070b6713e4c72fb Mon Sep 17 00:00:00 2001 From: MFunction96 Date: Mon, 26 Aug 2024 22:01:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=87=AA=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E4=BD=8D=E7=BD=AE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/KorabliChsMod.Core/UpdateHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KorabliChsMod.Core/UpdateHelper.cs b/src/KorabliChsMod.Core/UpdateHelper.cs index ce4d70f..5ddb9cb 100644 --- a/src/KorabliChsMod.Core/UpdateHelper.cs +++ b/src/KorabliChsMod.Core/UpdateHelper.cs @@ -57,7 +57,7 @@ await networkEngine.DownloadAsync(new HttpRequestMessage(HttpMethod.Get, downloa { FileName = @"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe", Arguments = - $"-ExecutionPolicy Unrestricted -Command \"Stop-Process -Id {Environment.ProcessId} -Force ; $p = Start-Process -FilePath \'{exeFile.FullPath}\' -ArgumentList \'/S /D={Path.GetDirectoryName(Environment.CurrentDirectory)}\' -PassThru ; $p.WaitForExit() ; Start-Process -FilePath \'{Environment.CurrentDirectory}\\KorabliChsMod.exe\'\"", + $"-ExecutionPolicy Unrestricted -Command \"Stop-Process -Id {Environment.ProcessId} -Force ; $p = Start-Process -FilePath \'{exeFile.FullPath}\' -ArgumentList \'/S /D={Environment.CurrentDirectory}\' -PassThru ; $p.WaitForExit() ; Start-Process -FilePath \'{Environment.CurrentDirectory}\\KorabliChsMod.exe\'\"", WorkingDirectory = Environment.CurrentDirectory, CreateNoWindow = true };