From 509ebf7437a6ddbf249be775de87615308c5bcc8 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Sun, 24 Nov 2024 21:35:50 +0100 Subject: [PATCH] bugfix: wait for admin installation process to complete --- util/chocolatey.psm1 | 2 +- util/winget.psm1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/util/chocolatey.psm1 b/util/chocolatey.psm1 index bbb4091..fdb1718 100644 --- a/util/chocolatey.psm1 +++ b/util/chocolatey.psm1 @@ -11,6 +11,6 @@ function ChocolateyInstall } # Start admin process, import this script, run 'InstallPackages' function - Start-Process powershell.exe -Verb RunAs ` + Start-Process powershell.exe -Verb RunAs -Wait ` -ArgumentList "-C", "'Import-Module ./chocolatey.psm1; InstallPackages'" } diff --git a/util/winget.psm1 b/util/winget.psm1 index ff3e94d..d6df2db 100644 --- a/util/winget.psm1 +++ b/util/winget.psm1 @@ -15,7 +15,7 @@ function WingetInstall if ($install.ToLower() -ne 'n') { # Start admin process, import this script, run 'InstallPackages' function - Start-Process powershell.exe -Verb RunAs ` + Start-Process powershell.exe -Verb RunAs -Wait ` -ArgumentList "-C", "'Import-Module ./winget.psm1; InstallWinget'" }