Allow custom winget arguments

This commit is contained in:
Manuel Thalmann 2024-08-08 04:29:00 +02:00
parent ddfbe17a49
commit 458c46575c

View file

@ -56,6 +56,7 @@ $null = New-Module {
function Install-WingetPackage { function Install-WingetPackage {
param( param(
[switch] $Force, [switch] $Force,
[string[]] $ArgumentList,
[Parameter(Position=0)] [Parameter(Position=0)]
[string] $Name, [string] $Name,
[Parameter(ValueFromRemainingArguments = $true)] [Parameter(ValueFromRemainingArguments = $true)]
@ -72,7 +73,7 @@ $null = New-Module {
--accept-source-agreements --accept-package-agreements ` --accept-source-agreements --accept-package-agreements `
--source winget ` --source winget `
--scope machine ` --scope machine `
--exact --id $name; --exact --id $name $ArgumentList;
} else { } else {
Write-Host "Package ``$name`` is already installed" Write-Host "Package ``$name`` is already installed"
} }