bugfix: set bypass policy for admin processes

This commit is contained in:
Baipyrus 2024-11-24 21:51:25 +01:00
parent eed5118341
commit df70d04ddc
3 changed files with 6 additions and 3 deletions

View File

@ -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'"
}

View File

@ -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)

View File

@ -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