From 62a35ed699319071d4ff5fd9995eb9e5d95da0af Mon Sep 17 00:00:00 2001 From: yeongpin Date: Sat, 11 Jan 2025 19:06:11 +0800 Subject: [PATCH] new ps1 --- scripts/install.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 0c32deb..9365057 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -68,7 +68,10 @@ if (-NOT $isAdmin) { } try { - Start-Process -FilePath $pwshPath -Verb RunAs -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"$($MyInvocation.MyCommand.Path)`"" -Wait + $arguments = "-NoProfile -ExecutionPolicy Bypass -File `"$($MyInvocation.MyCommand.Path)`" -WindowStyle Normal" + Start-Process -FilePath $pwshPath -Verb RunAs -ArgumentList $arguments + Write-Host "`n請在新開啟的管理員權限視窗中繼續操作..." -ForegroundColor $Theme.Primary + Start-Sleep -Seconds 3 exit } catch {