From df70d04ddc75bd9e4d6c40578c9772d429e64f3b Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Sun, 24 Nov 2024 21:51:25 +0100 Subject: [PATCH] bugfix: set bypass policy for admin processes --- util/chocolatey.psm1 | 3 ++- util/winget.psm1 | 3 ++- util/wsl.psm1 | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/util/chocolatey.psm1 b/util/chocolatey.psm1 index b9666e0..037d71d 100644 --- a/util/chocolatey.psm1 +++ b/util/chocolatey.psm1 @@ -12,5 +12,6 @@ function ChocolateyInstall # Start admin process, import this script, run 'InstallPackages' function Start-Process powershell.exe -Verb RunAs -Wait ` - -ArgumentList "-C", "'Import-Module ./chocolatey.psm1; InstallPackages'" + -ArgumentList "-ExecutionPolicy", "Bypass", ` + "-C", "'Import-Module ./chocolatey.psm1; InstallPackages'" } diff --git a/util/winget.psm1 b/util/winget.psm1 index f268189..556fa14 100644 --- a/util/winget.psm1 +++ b/util/winget.psm1 @@ -16,7 +16,8 @@ function WingetInstall { # Start admin process, import this script, run 'InstallPackages' function Start-Process powershell.exe -Verb RunAs -Wait ` - -ArgumentList "-C", "'Import-Module ./winget.psm1; InstallWinget'" + -ArgumentList "-ExecutionPolicy", "Bypass", ` + "-C", "'Import-Module ./winget.psm1; InstallWinget'" } winget.exe install -s winget --accept-source-agreements (Get-Content ./util/winget.list) diff --git a/util/wsl.psm1 b/util/wsl.psm1 index 33d2301..3fede63 100644 --- a/util/wsl.psm1 +++ b/util/wsl.psm1 @@ -22,7 +22,8 @@ function WSLInstall { # Start admin process, import this script, run 'InstallPackages' function Start-Process powershell.exe -Verb RunAs -Wait ` - -ArgumentList "-C", "'Import-Module ./wsl.psm1; InstallWSL'" + -ArgumentList "-ExecutionPolicy", "Bypass", ` + "-C", "'Import-Module ./wsl.psm1; InstallWSL'" } wsl.exe --install -d Ubuntu