From 65212e6dc07cccafa98d2c68486cb351b45c20c6 Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Sun, 23 Apr 2023 16:21:28 +0200 Subject: [PATCH] new param --- Winget-AutoUpdate-Install.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Winget-AutoUpdate-Install.ps1 b/Winget-AutoUpdate-Install.ps1 index 7baece4..930e1ad 100644 --- a/Winget-AutoUpdate-Install.ps1 +++ b/Winget-AutoUpdate-Install.ps1 @@ -111,6 +111,7 @@ param( [Parameter(Mandatory = $False)] [DateTime] $UpdatesAtTime = ("06am"), [Parameter(Mandatory = $False)] [Switch] $BypassListForUsers = $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)] [int64] $MaxLogSize = 1048576 # in bytes, default is 1048576 = 1 MB ) @@ -373,6 +374,9 @@ function Install-WingetAutoUpdate { if ($BypassListForUsers) { 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 . "$WingetUpdatePath\functions\Start-Init.ps1"