new param

pull/339/head^2
Romain 2023-04-23 16:21:28 +02:00 committed by GitHub
parent 65f97c8a02
commit 65212e6dc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -111,6 +111,7 @@ param(
[Parameter(Mandatory = $False)] [DateTime] $UpdatesAtTime = ("06am"), [Parameter(Mandatory = $False)] [DateTime] $UpdatesAtTime = ("06am"),
[Parameter(Mandatory = $False)] [Switch] $BypassListForUsers = $false, [Parameter(Mandatory = $False)] [Switch] $BypassListForUsers = $false,
[Parameter(Mandatory = $False)] [Switch] $InstallUserContext = $false, [Parameter(Mandatory = $False)] [Switch] $InstallUserContext = $false,
[Parameter(Mandatory = $False)] [Switch] $WAU_UserApproval= $false,
[Parameter(Mandatory = $False)] [ValidateRange(0, 99)] [int32] $MaxLogFiles = 3, [Parameter(Mandatory = $False)] [ValidateRange(0, 99)] [int32] $MaxLogFiles = 3,
[Parameter(Mandatory = $False)] [int64] $MaxLogSize = 1048576 # in bytes, default is 1048576 = 1 MB [Parameter(Mandatory = $False)] [int64] $MaxLogSize = 1048576 # in bytes, default is 1048576 = 1 MB
) )
@ -373,6 +374,9 @@ function Install-WingetAutoUpdate {
if ($BypassListForUsers) { if ($BypassListForUsers) {
New-ItemProperty $regPath -Name WAU_BypassListForUsers -Value 1 -PropertyType DWord -Force | Out-Null New-ItemProperty $regPath -Name WAU_BypassListForUsers -Value 1 -PropertyType DWord -Force | Out-Null
} }
if ($WAU_UserApproval) {
New-ItemProperty $regPath -Name WAU_UserApproval -Value 1 -PropertyType DWord -Force | Out-Null
}
#Log file and symlink initialization #Log file and symlink initialization
. "$WingetUpdatePath\functions\Start-Init.ps1" . "$WingetUpdatePath\functions\Start-Init.ps1"