From 49fd8e815329f5a443d626a5854fdb3c0bc51505 Mon Sep 17 00:00:00 2001 From: Adam Schubert Date: Sat, 14 Mar 2026 16:47:50 +0100 Subject: [PATCH 01/12] fix(WingetSourceCustom): Correctly pass value of WingetSourceCustom to required functions and replace hardoded -s 'winget' with -s $src --- Sources/Winget-AutoUpdate/Winget-Install.ps1 | 8 +++---- Sources/Winget-AutoUpdate/Winget-Upgrade.ps1 | 6 ++--- .../functions/Confirm-Installation.ps1 | 4 ++-- .../functions/Get-AppInfo.ps1 | 4 ++-- .../functions/Update-App.ps1 | 10 ++++---- .../mods/_Mods-Functions.ps1 | 24 +++++++++---------- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Sources/Winget-AutoUpdate/Winget-Install.ps1 b/Sources/Winget-AutoUpdate/Winget-Install.ps1 index 15318ba5e..9d38b7275 100644 --- a/Sources/Winget-AutoUpdate/Winget-Install.ps1 +++ b/Sources/Winget-AutoUpdate/Winget-Install.ps1 @@ -140,7 +140,7 @@ function Test-ModsUninstall ($AppID) { #Install function function Install-App ($AppID, $AppArgs) { - $IsInstalled = Confirm-Installation $AppID + $IsInstalled = Confirm-Installation $AppID -src 'winget' if (!($IsInstalled) -or $AllowUpgrade ) { #Check if mods exist (or already exist) for preinstall/override/custom/arguments/install/installed $ModsPreInstall, $ModsOverride, $ModsCustom, $ModsArguments, $ModsInstall, $ModsInstalled = Test-ModsInstall $($AppID) @@ -185,7 +185,7 @@ function Install-App ($AppID, $AppArgs) { } #Check if install is ok - $IsInstalled = Confirm-Installation $AppID + $IsInstalled = Confirm-Installation $AppID -src 'winget' if ($IsInstalled) { Write-ToLog "-> $AppID successfully installed." "Green" @@ -210,7 +210,7 @@ function Install-App ($AppID, $AppArgs) { #Uninstall function function Uninstall-App ($AppID, $AppArgs) { - $IsInstalled = Confirm-Installation $AppID + $IsInstalled = Confirm-Installation $AppID -src 'winget' if ($IsInstalled) { #Check if mods exist (or already exist) for preuninstall/uninstall/uninstalled $ModsPreUninstall, $ModsUninstall, $ModsUninstalled = Test-ModsUninstall $AppID @@ -244,7 +244,7 @@ function Uninstall-App ($AppID, $AppArgs) { } #Check if uninstall is ok - $IsInstalled = Confirm-Installation $AppID + $IsInstalled = Confirm-Installation $AppID -src 'winget' if (!($IsInstalled)) { Write-ToLog "-> $AppID successfully uninstalled." "Green" if ($ModsUninstalled) { diff --git a/Sources/Winget-AutoUpdate/Winget-Upgrade.ps1 b/Sources/Winget-AutoUpdate/Winget-Upgrade.ps1 index 29c5e617e..26875b6f3 100644 --- a/Sources/Winget-AutoUpdate/Winget-Upgrade.ps1 +++ b/Sources/Winget-AutoUpdate/Winget-Upgrade.ps1 @@ -307,12 +307,12 @@ if (Test-Network) { } #if app is in "include list", update it elseif ($toUpdate -contains $app.Id) { - Update-App $app + Update-App $app -src $Script:WingetSourceCustom } #if app with wildcard is in "include list", update it elseif ($toUpdate | Where-Object { $app.Id -like $_ }) { Write-ToLog "$($app.Name) is wildcard in the include list." - Update-App $app + Update-App $app -src $Script:WingetSourceCustom } #else, skip it else { @@ -338,7 +338,7 @@ if (Test-Network) { } # else, update it else { - Update-App $app + Update-App $app -src $Script:WingetSourceCustom } } } diff --git a/Sources/Winget-AutoUpdate/functions/Confirm-Installation.ps1 b/Sources/Winget-AutoUpdate/functions/Confirm-Installation.ps1 index 0d195b829..469edd608 100644 --- a/Sources/Winget-AutoUpdate/functions/Confirm-Installation.ps1 +++ b/Sources/Winget-AutoUpdate/functions/Confirm-Installation.ps1 @@ -11,10 +11,10 @@ .OUTPUTS Boolean: True if installed at version. #> -Function Confirm-Installation ($AppName, $AppVer) { +Function Confirm-Installation ($AppName, $AppVer, $src) { $JsonFile = "$env:TEMP\InstalledApps.json" - & $Winget export -s winget -o $JsonFile --include-versions | Out-Null + & $Winget export -s $src -o $JsonFile --include-versions | Out-Null $Packages = (Get-Content $JsonFile -Raw | ConvertFrom-Json).Sources.Packages $match = $Packages | Where-Object { $_.PackageIdentifier -eq $AppName -and $_.Version -like "$AppVer*" } diff --git a/Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 b/Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 index c226725fc..7e964b7d2 100644 --- a/Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 +++ b/Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 @@ -18,10 +18,10 @@ .NOTES Uses WinGet show command with source agreements accepted. #> -Function Get-AppInfo ($AppID) { +Function Get-AppInfo ($AppID, $src) { # Query WinGet for application details - $String = & $winget show $AppID --accept-source-agreements -s winget | Out-String + $String = & $winget show $AppID --accept-source-agreements -s $src | Out-String # Extract Release Notes URL using regex $ReleaseNote = [regex]::match($String, "(?<=Release Notes Url: )(.*)(?=\n)").Groups[0].Value diff --git a/Sources/Winget-AutoUpdate/functions/Update-App.ps1 b/Sources/Winget-AutoUpdate/functions/Update-App.ps1 index c6850c798..638af5d40 100644 --- a/Sources/Winget-AutoUpdate/functions/Update-App.ps1 +++ b/Sources/Winget-AutoUpdate/functions/Update-App.ps1 @@ -9,11 +9,11 @@ .PARAMETER app PSCustomObject with Name, Id, Version, AvailableVersion properties. #> -Function Update-App ($app) { +Function Update-App ($app, $src) { # Helper function to build winget command parameters function Get-WingetParams ($Command, $ModsOverride, $ModsCustom, $ModsArguments) { - $params = @($Command, "--id", $app.Id, "-e", "--accept-package-agreements", "--accept-source-agreements", "-s", "winget") + $params = @($Command, "--id", $app.Id, "-e", "--accept-package-agreements", "--accept-source-agreements", "-s", $src) if ($Command -eq "install") { $params += "--force" } if ($ModsOverride) { @@ -31,7 +31,7 @@ Function Update-App ($app) { } # Get release notes for notification button - $ReleaseNoteURL = Get-AppInfo $app.Id + $ReleaseNoteURL = Get-AppInfo $app.Id $src $Button1Text = if ($ReleaseNoteURL) { $NotifLocale.local.outputs.output[10].message } else { $null } # Send "updating" notification @@ -64,7 +64,7 @@ Function Update-App ($app) { & $ModsUpgrade } - $ConfirmInstall = Confirm-Installation $app.Id $app.AvailableVersion + $ConfirmInstall = Confirm-Installation $app.Id $app.AvailableVersion $src # Fallback to install if upgrade failed if (-not $ConfirmInstall) { @@ -82,7 +82,7 @@ Function Update-App ($app) { & $ModsInstall } - $ConfirmInstall = Confirm-Installation $app.Id $app.AvailableVersion + $ConfirmInstall = Confirm-Installation $app.Id $app.AvailableVersion $src } } diff --git a/Sources/Winget-AutoUpdate/mods/_Mods-Functions.ps1 b/Sources/Winget-AutoUpdate/mods/_Mods-Functions.ps1 index 9410e680c..a660c7c81 100644 --- a/Sources/Winget-AutoUpdate/mods/_Mods-Functions.ps1 +++ b/Sources/Winget-AutoUpdate/mods/_Mods-Functions.ps1 @@ -49,16 +49,16 @@ function Wait-ModsProc ($Wait) { Return } -function Install-WingetID ($WingetIDInst) { +function Install-WingetID ($WingetIDInst, $src = 'winget') { foreach ($app in $WingetIDInst) { - & $Winget install --id $app -e --accept-package-agreements --accept-source-agreements -s winget -h + & $Winget install --id $app -e --accept-package-agreements --accept-source-agreements -s $src -h } Return } -function Uninstall-WingetID ($WingetIDUninst) { +function Uninstall-WingetID ($WingetIDUninst, $src = 'winget') { foreach ($app in $WingetIDUninst) { - & $Winget uninstall --id $app -e --accept-source-agreements -s winget -h + & $Winget uninstall --id $app -e --accept-source-agreements -s $src -h } Return } @@ -188,37 +188,37 @@ function Remove-ModsLnk ($Lnk) { function Add-ProgramsShortcuts ($Shortcuts, $ShortcutsTargets) { $programsPath = "${env:ProgramData}\Microsoft\Windows\Start Menu\Programs" $createdCount = 0 - + # Validate arrays match in length and are not just empty placeholders if ($Shortcuts.Count -ne $ShortcutsTargets.Count -or ($Shortcuts.Count -eq 1 -and [string]::IsNullOrEmpty($Shortcuts[0]))) { Return $createdCount } - + # Create WScript.Shell COM object $WshShell = New-Object -ComObject WScript.Shell -ErrorAction SilentlyContinue if (!$WshShell) { Return $createdCount } - + # Iterate through shortcuts for ($i = 0; $i -lt $Shortcuts.Count; $i++) { $shortcutName = $Shortcuts[$i] $targetPath = $ShortcutsTargets[$i] - + # Skip empty entries if ([string]::IsNullOrEmpty($shortcutName) -or [string]::IsNullOrEmpty($targetPath)) { continue } - + # Construct full shortcut path $shortcutPath = Join-Path $programsPath "$shortcutName.lnk" - + # Create parent directory if it doesn't exist $shortcutDir = Split-Path $shortcutPath -Parent if (!(Test-Path $shortcutDir)) { New-Item -Path $shortcutDir -ItemType Directory -Force -ErrorAction SilentlyContinue | Out-Null } - + # Verify target exists if (Test-Path $targetPath) { # Create shortcut @@ -232,7 +232,7 @@ function Add-ProgramsShortcuts ($Shortcuts, $ShortcutsTargets) { $createdCount++ } } - + Return $createdCount } From bb87ec5d312ae56a71ef3c8e72c2d496d315ddc8 Mon Sep 17 00:00:00 2001 From: Adam Schubert Date: Sat, 21 Mar 2026 16:00:09 +0100 Subject: [PATCH 02/12] feat(Winget-Install): Support -Source parameter that defaults to winget for backward compatibility --- Sources/Winget-AutoUpdate/Winget-Install.ps1 | 21 ++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Sources/Winget-AutoUpdate/Winget-Install.ps1 b/Sources/Winget-AutoUpdate/Winget-Install.ps1 index 9d38b7275..5b3344fca 100644 --- a/Sources/Winget-AutoUpdate/Winget-Install.ps1 +++ b/Sources/Winget-AutoUpdate/Winget-Install.ps1 @@ -48,7 +48,8 @@ param( [Parameter(Mandatory = $False)] [Switch] $Uninstall, [Parameter(Mandatory = $False)] [String] $LogPath, [Parameter(Mandatory = $False)] [Switch] $WAUWhiteList, - [Parameter(Mandatory = $False)] [Switch] $AllowUpgrade + [Parameter(Mandatory = $False)] [Switch] $AllowUpgrade, + [Parameter(Mandatory = $False)] [String] $Source = "winget", ) @@ -139,8 +140,8 @@ function Test-ModsUninstall ($AppID) { } #Install function -function Install-App ($AppID, $AppArgs) { - $IsInstalled = Confirm-Installation $AppID -src 'winget' +function Install-App ($AppID, $AppArgs, $Source = 'winget') { + $IsInstalled = Confirm-Installation $AppID -src $Source if (!($IsInstalled) -or $AllowUpgrade ) { #Check if mods exist (or already exist) for preinstall/override/custom/arguments/install/installed $ModsPreInstall, $ModsOverride, $ModsCustom, $ModsArguments, $ModsInstall, $ModsInstalled = Test-ModsInstall $($AppID) @@ -170,7 +171,7 @@ function Install-App ($AppID, $AppArgs) { $finalArgs = if ($ModsArguments) { $ModsArguments } else { $AppArgs } Write-ToLog "-> Arguments (winget-level): $finalArgs" # Winget parameters with -h $argArray = ConvertTo-WingetArgumentArray $finalArgs - $WingetArgs = @("install", "--id", $AppID, "-e", "--accept-package-agreements", "--accept-source-agreements", "-s", "winget") + $argArray + @("-h") + $WingetArgs = @("install", "--id", $AppID, "-e", "--accept-package-agreements", "--accept-source-agreements", "-s", $Source) + $argArray + @("-h") } else { $WingetArgs = "install --id $AppID -e --accept-package-agreements --accept-source-agreements -s winget -h" -split " " @@ -185,7 +186,7 @@ function Install-App ($AppID, $AppArgs) { } #Check if install is ok - $IsInstalled = Confirm-Installation $AppID -src 'winget' + $IsInstalled = Confirm-Installation $AppID -src $Source if ($IsInstalled) { Write-ToLog "-> $AppID successfully installed." "Green" @@ -209,8 +210,8 @@ function Install-App ($AppID, $AppArgs) { } #Uninstall function -function Uninstall-App ($AppID, $AppArgs) { - $IsInstalled = Confirm-Installation $AppID -src 'winget' +function Uninstall-App ($AppID, $AppArgs, $Source = 'winget') { + $IsInstalled = Confirm-Installation $AppID -src $Source if ($IsInstalled) { #Check if mods exist (or already exist) for preuninstall/uninstall/uninstalled $ModsPreUninstall, $ModsUninstall, $ModsUninstalled = Test-ModsUninstall $AppID @@ -244,7 +245,7 @@ function Uninstall-App ($AppID, $AppArgs) { } #Check if uninstall is ok - $IsInstalled = Confirm-Installation $AppID -src 'winget' + $IsInstalled = Confirm-Installation $AppID -src $Source if (!($IsInstalled)) { Write-ToLog "-> $AppID successfully uninstalled." "Green" if ($ModsUninstalled) { @@ -399,14 +400,14 @@ if ($Winget) { #Install or Uninstall command if ($Uninstall) { - Uninstall-App $AppID $AppArgs + Uninstall-App $AppID $AppArgs -src $Source } else { #Check if app exists on Winget Repo $Exists = Confirm-Exist $AppID if ($Exists) { #Install - Install-App $AppID $AppArgs + Install-App $AppID $AppArgs -src $source } } From 695c3f67bd05c7e71d03c6cc22d279835585a3cb Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Mon, 23 Mar 2026 12:01:31 +0100 Subject: [PATCH 03/12] Update Winget-Install.ps1 to remove deprecated info Remove deprecated notes regarding standalone usage and GitHub link. --- Sources/Winget-AutoUpdate/Winget-Install.ps1 | 2 -- 1 file changed, 2 deletions(-) diff --git a/Sources/Winget-AutoUpdate/Winget-Install.ps1 b/Sources/Winget-AutoUpdate/Winget-Install.ps1 index 5b3344fca..34f1bc94f 100644 --- a/Sources/Winget-AutoUpdate/Winget-Install.ps1 +++ b/Sources/Winget-AutoUpdate/Winget-Install.ps1 @@ -1,11 +1,9 @@ <# .SYNOPSIS Install apps with Winget through Intune or SCCM. -(Can be used standalone.) - Deprecated in favor of Winget-AutoUpdate. .DESCRIPTION Allow to run Winget in System Context to install your apps. -(https://github.com/Romanitho/Winget-Install) - Deprecated in favor of Winget-AutoUpdate. .PARAMETER AppIDs Forward Winget App ID to install. For multiple apps, separate with ",". Case sensitive. From e43896f9397488f3076a18f4961cd5ca86ccdbc6 Mon Sep 17 00:00:00 2001 From: Adam Schubert Date: Mon, 23 Mar 2026 19:28:57 +0100 Subject: [PATCH 04/12] Update .github/workflows/GA_Close-Inactive-Issues.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/GA_Close-Inactive-Issues.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/GA_Close-Inactive-Issues.yml b/.github/workflows/GA_Close-Inactive-Issues.yml index 2735b3b1d..53943d06e 100644 --- a/.github/workflows/GA_Close-Inactive-Issues.yml +++ b/.github/workflows/GA_Close-Inactive-Issues.yml @@ -12,7 +12,6 @@ jobs: permissions: issues: write pull-requests: write - contents: write steps: - uses: actions/stale@v10.1.1 with: From 152d4b341dc1ea401a862059d3fd8b6c792d99b8 Mon Sep 17 00:00:00 2001 From: Adam Schubert Date: Mon, 23 Mar 2026 19:39:19 +0100 Subject: [PATCH 05/12] feat: Add docs to new parameters and make it optional --- Sources/Winget-AutoUpdate/functions/Confirm-Installation.ps1 | 4 ++++ Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 | 5 ++++- Sources/Winget-AutoUpdate/functions/Update-App.ps1 | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Sources/Winget-AutoUpdate/functions/Confirm-Installation.ps1 b/Sources/Winget-AutoUpdate/functions/Confirm-Installation.ps1 index 469edd608..d7b6ca432 100644 --- a/Sources/Winget-AutoUpdate/functions/Confirm-Installation.ps1 +++ b/Sources/Winget-AutoUpdate/functions/Confirm-Installation.ps1 @@ -8,6 +8,10 @@ .PARAMETER AppVer Expected version prefix. +.PARAMETER src + The WinGet source to query (e.g. "winget", "msstore"). Required; passed + directly to `winget export -s`. + .OUTPUTS Boolean: True if installed at version. #> diff --git a/Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 b/Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 index 7e964b7d2..c22529635 100644 --- a/Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 +++ b/Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 @@ -9,11 +9,14 @@ .PARAMETER AppID The WinGet package identifier to query. +.PARAMETER src + The WinGet source to query (e.g. "winget", "msstore"). + .OUTPUTS String containing the release notes URL, or empty if not found. .EXAMPLE - $releaseUrl = Get-AppInfo "Microsoft.PowerShell" + $releaseUrl = Get-AppInfo "Microsoft.PowerShell" "winget" .NOTES Uses WinGet show command with source agreements accepted. diff --git a/Sources/Winget-AutoUpdate/functions/Update-App.ps1 b/Sources/Winget-AutoUpdate/functions/Update-App.ps1 index 638af5d40..6a765f4d0 100644 --- a/Sources/Winget-AutoUpdate/functions/Update-App.ps1 +++ b/Sources/Winget-AutoUpdate/functions/Update-App.ps1 @@ -8,8 +8,11 @@ .PARAMETER app PSCustomObject with Name, Id, Version, AvailableVersion properties. + +.PARAMETER src + The WinGet source to use (e.g. 'winget', 'msstore'). Defaults to 'winget'. #> -Function Update-App ($app, $src) { +Function Update-App ($app, $src = "winget") { # Helper function to build winget command parameters function Get-WingetParams ($Command, $ModsOverride, $ModsCustom, $ModsArguments) { From 8d2c4a0f957fe6c50ab38c8c8cab5920af9cdb96 Mon Sep 17 00:00:00 2001 From: Adam Schubert Date: Mon, 23 Mar 2026 19:40:39 +0100 Subject: [PATCH 06/12] fix(Winget-Install): Replace more hardcoded 'winget' sources with $Source, use array for $WingetArgs since parameters could also contain spaces and that would break while using - split "" --- Sources/Winget-AutoUpdate/Winget-Install.ps1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Sources/Winget-AutoUpdate/Winget-Install.ps1 b/Sources/Winget-AutoUpdate/Winget-Install.ps1 index 34f1bc94f..0c5cffbce 100644 --- a/Sources/Winget-AutoUpdate/Winget-Install.ps1 +++ b/Sources/Winget-AutoUpdate/Winget-Install.ps1 @@ -47,7 +47,7 @@ param( [Parameter(Mandatory = $False)] [String] $LogPath, [Parameter(Mandatory = $False)] [Switch] $WAUWhiteList, [Parameter(Mandatory = $False)] [Switch] $AllowUpgrade, - [Parameter(Mandatory = $False)] [String] $Source = "winget", + [Parameter(Mandatory = $False)] [String] $Source = "winget" ) @@ -75,7 +75,7 @@ else { #Check if App exists in Winget Repository function Confirm-Exist ($AppID) { #Check is app exists in the winget repository - $WingetApp = & $winget show --Id $AppID -e --accept-source-agreements -s winget | Out-String + $WingetApp = & $winget show --Id $AppID -e --accept-source-agreements -s $Source | Out-String #Return if AppID exists if ($WingetApp -match [regex]::Escape($AppID)) { @@ -158,11 +158,11 @@ function Install-App ($AppID, $AppArgs, $Source = 'winget') { Write-ToLog "-> Installing $AppID..." "DarkYellow" if ($ModsOverride) { Write-ToLog "-> Arguments (overriding default): $ModsOverride" # Without -h (user overrides default) - $WingetArgs = "install --id $AppID -e --accept-package-agreements --accept-source-agreements -s winget --override $ModsOverride" -split " " + $WingetArgs = @("install", "--id", $AppID, "-e", "--accept-package-agreements", "--accept-source-agreements", "-s", $Source, "--override", $ModsOverride) } elseif ($ModsCustom) { Write-ToLog "-> Arguments (customizing default): $ModsCustom" # With -h (user customizes default) - $WingetArgs = "install --id $AppID -e --accept-package-agreements --accept-source-agreements -s winget -h --custom $ModsCustom" -split " " + $WingetArgs = @("install", "--id", $AppID, "-e", "--accept-package-agreements", "--accept-source-agreements", "-s", $Source, "-h", "--custom", $ModsCustom) } elseif ($ModsArguments -or (-not [string]::IsNullOrWhiteSpace($AppArgs))) { # Prioritize ModsArguments from file over AppArgs from command line @@ -172,7 +172,7 @@ function Install-App ($AppID, $AppArgs, $Source = 'winget') { $WingetArgs = @("install", "--id", $AppID, "-e", "--accept-package-agreements", "--accept-source-agreements", "-s", $Source) + $argArray + @("-h") } else { - $WingetArgs = "install --id $AppID -e --accept-package-agreements --accept-source-agreements -s winget -h" -split " " + $WingetArgs = @("install", "--id", $AppID, "-e", "--accept-package-agreements", "--accept-source-agreements", "-s", $Source, "-h") } Write-ToLog "-> Running: `"$Winget`" $WingetArgs" @@ -398,14 +398,14 @@ if ($Winget) { #Install or Uninstall command if ($Uninstall) { - Uninstall-App $AppID $AppArgs -src $Source + Uninstall-App $AppID $AppArgs $Source } else { #Check if app exists on Winget Repo $Exists = Confirm-Exist $AppID if ($Exists) { #Install - Install-App $AppID $AppArgs -src $source + Install-App $AppID $AppArgs $Source } } From 767bbb0e67ac2897e024fd5d84eb91c384688f33 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Wed, 25 Mar 2026 19:50:24 +0100 Subject: [PATCH 07/12] Correct VC++ Redistributable download URL --- Sources/Winget-AutoUpdate/functions/Install-Prerequisites.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Winget-AutoUpdate/functions/Install-Prerequisites.ps1 b/Sources/Winget-AutoUpdate/functions/Install-Prerequisites.ps1 index 5cd9528e7..64670b5ad 100644 --- a/Sources/Winget-AutoUpdate/functions/Install-Prerequisites.ps1 +++ b/Sources/Winget-AutoUpdate/functions/Install-Prerequisites.ps1 @@ -64,7 +64,7 @@ function Install-Prerequisites { if ($needsInstall) { try { Write-ToLog "Installing VC++ Redistributable ($osArch)..." - $VCRedistUrl = "https://aka.ms/vs/17/release/VC_redist.$osArch.exe" + $VCRedistUrl = "https://aka.ms/vc14/VC_redist.$osArch.exe" $installer = "$env:TEMP\VC_redist.$osArch.exe" Invoke-WebRequest $VCRedistUrl -OutFile $installer -UseBasicParsing From fead5a221e062c21b18425352eb558f1dadc976f Mon Sep 17 00:00:00 2001 From: Adam Schubert Date: Thu, 26 Mar 2026 13:11:02 +0100 Subject: [PATCH 08/12] Update Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 b/Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 index c22529635..ad226ca22 100644 --- a/Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 +++ b/Sources/Winget-AutoUpdate/functions/Get-AppInfo.ps1 @@ -21,8 +21,11 @@ .NOTES Uses WinGet show command with source agreements accepted. #> -Function Get-AppInfo ($AppID, $src) { +Function Get-AppInfo ($AppID, $src = 'winget') { + if ([string]::IsNullOrWhiteSpace($src)) { + $src = 'winget' + } # Query WinGet for application details $String = & $winget show $AppID --accept-source-agreements -s $src | Out-String From d6cba1f57796f68c0d748edddce6b73314339fb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 06:03:23 +0000 Subject: [PATCH 09/12] Bump peter-evans/create-pull-request from 8.1.0 to 8.1.1 Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 8.1.0 to 8.1.1. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/c0f553fe549906ede9cf27b5156039d195d2ece0...5f6978faf089d4d20b00c7766989d076bb2fc7f1) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-version: 8.1.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/GA_Mega-linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/GA_Mega-linter.yml b/.github/workflows/GA_Mega-linter.yml index 1d3ed2f34..5d2a561e2 100644 --- a/.github/workflows/GA_Mega-linter.yml +++ b/.github/workflows/GA_Mega-linter.yml @@ -71,7 +71,7 @@ jobs: - name: Create Pull Request with applied fixes id: cpr if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix') - uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0 + uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} commit-message: "[MegaLinter] Apply linters automatic fixes" From 5d157cd4744ad1e9aab71339c54067cf3f2a9cf6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 06:03:29 +0000 Subject: [PATCH 10/12] Bump actions/github-script from 8 to 9 Bumps [actions/github-script](https://github.com/actions/github-script) from 8 to 9. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v8...v9) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '9' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .../workflows/GitFlow_Check-pull-request-source-branch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/GitFlow_Check-pull-request-source-branch.yml b/.github/workflows/GitFlow_Check-pull-request-source-branch.yml index 7ae6fc3c7..0100bb25f 100644 --- a/.github/workflows/GitFlow_Check-pull-request-source-branch.yml +++ b/.github/workflows/GitFlow_Check-pull-request-source-branch.yml @@ -59,7 +59,7 @@ jobs: # Step 2: If the branch pattern is invalid, add a label and comment to the PR - name: Handle invalid branch (label + comment) if: failure() - uses: actions/github-script@v8 + uses: actions/github-script@v9 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | @@ -122,7 +122,7 @@ jobs: # Step 3: If the branch pattern is corrected, remove label and comment - name: Clean up if branch is corrected if: success() - uses: actions/github-script@v8 + uses: actions/github-script@v9 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | From efa9564edfc25f8ecbb671b2b3f70b1a7bc06d23 Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Thu, 23 Apr 2026 23:06:56 +0200 Subject: [PATCH 11/12] update MCKanpolat/auto-semver-action --- .github/workflows/GitFlow_Create-Release-Branch-and-PR.yaml | 2 +- .github/workflows/GitFlow_Nightly-builds.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/GitFlow_Create-Release-Branch-and-PR.yaml b/.github/workflows/GitFlow_Create-Release-Branch-and-PR.yaml index 6d6edd2d3..f3046b2ff 100644 --- a/.github/workflows/GitFlow_Create-Release-Branch-and-PR.yaml +++ b/.github/workflows/GitFlow_Create-Release-Branch-and-PR.yaml @@ -26,7 +26,7 @@ jobs: steps: # Step 1: Calculate the next version number based on the selected increment type - name: Auto Increment Semver Action - uses: MCKanpolat/auto-semver-action@5003b8d37f4b03d95f15303ea10242cbf7c13141 # 2 + uses: MCKanpolat/auto-semver-action@632a84f5d1232fe655c7a85684ba3105c28b3fec # 1.0.11 id: versioning with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/GitFlow_Nightly-builds.yml b/.github/workflows/GitFlow_Nightly-builds.yml index 46b7ac331..3c298cfb1 100644 --- a/.github/workflows/GitFlow_Nightly-builds.yml +++ b/.github/workflows/GitFlow_Nightly-builds.yml @@ -133,7 +133,7 @@ jobs: # Step 3: Generate new semantic version number - name: Auto Increment Semver Action - uses: MCKanpolat/auto-semver-action@5003b8d37f4b03d95f15303ea10242cbf7c13141 # 2 + uses: MCKanpolat/auto-semver-action@632a84f5d1232fe655c7a85684ba3105c28b3fec # 1.0.11 if: steps.check_prs.outputs.BUILD_NEEDED == 'true' id: versioning with: From 5beb7c62b20eeb05dd74ec3f941d25ffc10408bc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 12:31:43 +0000 Subject: [PATCH 12/12] fix source defaults and docs per PR review Agent-Logs-Url: https://github.com/Romanitho/Winget-AutoUpdate/sessions/a20c464c-2629-46fc-85da-460e089fba65 Co-authored-by: Romanitho <96626929+Romanitho@users.noreply.github.com> --- Sources/Winget-AutoUpdate/Winget-Install.ps1 | 6 ++++++ .../functions/Confirm-Installation.ps1 | 12 +++++++++--- Sources/Winget-AutoUpdate/functions/Update-App.ps1 | 6 ++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Sources/Winget-AutoUpdate/Winget-Install.ps1 b/Sources/Winget-AutoUpdate/Winget-Install.ps1 index 0c5cffbce..504c91c4f 100644 --- a/Sources/Winget-AutoUpdate/Winget-Install.ps1 +++ b/Sources/Winget-AutoUpdate/Winget-Install.ps1 @@ -21,6 +21,9 @@ Used to specify logpath. Default is same folder as Winget-Autoupdate project Adds the app to the Winget-AutoUpdate White List. More info: https://github.com/Romanitho/Winget-AutoUpdate If '-Uninstall' is used, it removes the app from WAU White List. +.PARAMETER Source +Specify the WinGet source to use for package operations (for example "winget" or "msstore"). Default is "winget". + .EXAMPLE .\winget-install.ps1 -AppIDs 7zip.7zip @@ -38,6 +41,9 @@ If '-Uninstall' is used, it removes the app from WAU White List. .EXAMPLE .\winget-install.ps1 -AppIDs "Notepad++.Notepad++" -AllowUpgrade + +.EXAMPLE +.\winget-install.ps1 -AppIDs 9WZDNCRFJ3PT -Source msstore #> [CmdletBinding()] diff --git a/Sources/Winget-AutoUpdate/functions/Confirm-Installation.ps1 b/Sources/Winget-AutoUpdate/functions/Confirm-Installation.ps1 index d7b6ca432..eb77ea91a 100644 --- a/Sources/Winget-AutoUpdate/functions/Confirm-Installation.ps1 +++ b/Sources/Winget-AutoUpdate/functions/Confirm-Installation.ps1 @@ -9,13 +9,19 @@ Expected version prefix. .PARAMETER src - The WinGet source to query (e.g. "winget", "msstore"). Required; passed - directly to `winget export -s`. + The WinGet source to query (e.g. "winget", "msstore"). Defaults to + "winget". .OUTPUTS Boolean: True if installed at version. #> -Function Confirm-Installation ($AppName, $AppVer, $src) { +Function Confirm-Installation ($AppName, $AppVer, $src = "winget") { + if ([string]::IsNullOrWhiteSpace($src)) { + $src = "winget" + } + else { + $src = $src.Trim() + } $JsonFile = "$env:TEMP\InstalledApps.json" & $Winget export -s $src -o $JsonFile --include-versions | Out-Null diff --git a/Sources/Winget-AutoUpdate/functions/Update-App.ps1 b/Sources/Winget-AutoUpdate/functions/Update-App.ps1 index 60ffc91aa..17251af84 100644 --- a/Sources/Winget-AutoUpdate/functions/Update-App.ps1 +++ b/Sources/Winget-AutoUpdate/functions/Update-App.ps1 @@ -13,6 +13,12 @@ The WinGet source to use (e.g. 'winget', 'msstore'). Defaults to 'winget'. #> Function Update-App ($app, $src = "winget") { + if ([string]::IsNullOrWhiteSpace($src)) { + $src = "winget" + } + else { + $src = $src.Trim() + } # Helper function to build winget command parameters function Get-WingetParams ($Command, $ModsOverride, $ModsCustom, $ModsArguments) {