Skip to content

Commit 593e7cc

Browse files
committed
Added simple parameter to pin the WAU Installation
1 parent e14465c commit 593e7cc

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Refresh-WingetConfiguration.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)