File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -347,7 +347,6 @@ if ( $commandLineArguments -ne $previousCommandLineArguments ) {
347347 iex $installCommand ;
348348 Write-LogFile " Updated WAU." - Severity 1
349349
350- if ( 1 ) { # This code is not ready yet.
351350 $wauWrapperEXE = Get-WAUWrapperEXE ;
352351 Write-LogFile - InputObject " Retrived wrapper exe $wauWrapperEXE ." - Severity 1
353352
@@ -375,6 +374,11 @@ if ( $commandLineArguments -ne $previousCommandLineArguments ) {
375374 Set-Shortcut - Target $wauWrapperEXE - Shortcut " ${env: Public} \Desktop\WAU - Check for updated Apps.lnk" - Arguments " [ARGSSELECTOR|user-run]"
376375 Write-LogFile " Modified desktop shortcuts to run $wauWrapperEXE ." - Severity 1
377376 }
377+
378+ if ( $configuration ." PinWAUInstallation" -eq 1 ) {
379+ & winget pin add -- id Romanitho.Winget- AutoUpdate | Out-Null ;
380+ } elseif ( $configuration ." PinWAUInstallation" -eq 0 ) {
381+ & winget pin remove -- id Romanitho.Winget- AutoUpdate | Out-Null ;
378382 }
379383
380384 # Run WAU in case it is not specified otherwise.
You can’t perform that action at this time.
0 commit comments