Skip to content
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
25c82bf
Merge main into develop after the creation of release v2.8.0
actions-user Aug 28, 2025
6697dfd
Bump ncipollo/release-action from 1.18.0 to 1.20.0
dependabot[bot] Sep 8, 2025
b8be096
Bump actions/github-script from 7 to 8
dependabot[bot] Sep 8, 2025
5285036
Bump actions/stale from 9 to 10
dependabot[bot] Sep 8, 2025
f1616b3
Bump oxsecurity/megalinter from 8.8.0 to 9.1.0
dependabot[bot] Oct 13, 2025
1a9224f
Bump stefanzweifel/git-auto-commit-action from 6.0.1 to 7.0.0
dependabot[bot] Oct 13, 2025
7df8ef8
Fix incorrect mettered connection detected in Windows Server 2022
panreyes Oct 30, 2025
8e9d160
DE locale fixes
Nov 3, 2025
cd2dca7
Add documentation and refactor WAU PowerShell scripts
Romanitho Nov 27, 2025
92ee85e
Update Sources/Winget-AutoUpdate/config/WAU-MSI_Actions.ps1
Romanitho Nov 27, 2025
e308811
Update Sources/Winget-AutoUpdate/functions/Get-NotifLocale.ps1
Romanitho Nov 27, 2025
d0deaf8
Merge pull request #1040 from Romanitho/dependabot/github_actions/dev…
Romanitho Nov 28, 2025
f037735
Merge pull request #1041 from Romanitho/dependabot/github_actions/dev…
Romanitho Nov 28, 2025
052542b
Merge pull request #1042 from Romanitho/dependabot/github_actions/dev…
Romanitho Nov 28, 2025
9ee47cd
Merge pull request #1053 from Romanitho/dependabot/github_actions/dev…
Romanitho Nov 28, 2025
8f7c8e2
Merge pull request #1054 from Romanitho/dependabot/github_actions/dev…
Romanitho Nov 28, 2025
2a25a92
Merge pull request #1063 from xkm-p/hotfix/locale-de-fix
Romanitho Nov 28, 2025
1a48e83
Merge pull request #1076 from Romanitho/copilot
Romanitho Nov 28, 2025
0d79b51
Merge branch 'develop' into main
Romanitho Nov 28, 2025
c02efb7
Merge pull request #1059 from panreyes/main
Romanitho Nov 28, 2025
91e53fe
Add per-app winget arguments support via {AppID}-arguments.txt
KnifMelti Nov 29, 2025
4fd7342
First error check
KnifMelti Nov 29, 2025
cd8c745
Fix error 2
KnifMelti Nov 29, 2025
bda50f4
Error System.Object fixed
KnifMelti Nov 29, 2025
1a65852
Update Sources/Winget-AutoUpdate/Winget-Install.ps1
KnifMelti Nov 29, 2025
bb2c055
Update Sources/Winget-AutoUpdate/functions/Update-App.ps1
KnifMelti Nov 29, 2025
6bcf451
GitHub missed one...
KnifMelti Nov 29, 2025
a54ba70
Enhance README and argument templates with locale-specific guidance f…
KnifMelti Nov 29, 2025
efe4c50
Update locale examples in README and argument template for consistenc…
KnifMelti Nov 30, 2025
f387d16
Pinned Apps is another pull #999
KnifMelti Nov 30, 2025
660429f
+ Shortcut Mod
KnifMelti Dec 1, 2025
545b9a9
Bump actions/upload-artifact from 4 to 5
dependabot[bot] Dec 1, 2025
43430a2
Bump peter-evans/create-pull-request from 7.0.8 to 7.0.9
dependabot[bot] Dec 1, 2025
45b6ec6
Bump oxsecurity/megalinter from 9.1.0 to 9.2.0
dependabot[bot] Dec 1, 2025
9f89cc0
Bump actions/checkout from 5 to 6
dependabot[bot] Dec 1, 2025
2a8d299
Merge pull request #1081 from Romanitho/dependabot/github_actions/dev…
Romanitho Dec 1, 2025
6de0138
Merge pull request #1080 from Romanitho/dependabot/github_actions/dev…
Romanitho Dec 1, 2025
08be884
Merge pull request #1079 from Romanitho/dependabot/github_actions/dev…
Romanitho Dec 1, 2025
fa1702c
Merge pull request #1078 from Romanitho/dependabot/github_actions/dev…
Romanitho Dec 1, 2025
51cc25d
Merge pull request #1077 from KnifMelti/feature/arguments
Romanitho Dec 1, 2025
a2ebb41
Bump actions/upload-artifact from 5 to 6
dependabot[bot] Dec 15, 2025
30f3b62
Bump peter-evans/create-pull-request from 7.0.9 to 8.0.0
dependabot[bot] Dec 15, 2025
7f174e5
Merge pull request #1090 from Romanitho/dependabot/github_actions/dev…
Romanitho Dec 15, 2025
9a160a6
Merge pull request #1091 from Romanitho/dependabot/github_actions/dev…
Romanitho Dec 15, 2025
450573d
0
Romanitho Dec 15, 2025
99ddffe
Fix image syntax in README.md
Romanitho Dec 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/GA_Close-Inactive-Issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
- uses: actions/stale@v10
with:
days-before-issue-stale: 30
days-before-issue-close: 14
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/GA_Mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
steps:
# Git Checkout
- name: Checkout Code
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
Expand All @@ -43,7 +43,7 @@ jobs:
id: ml
# You can override MegaLinter flavor used to have faster performances
# More info at https://megalinter.github.io/flavors/
uses: oxsecurity/megalinter@e08c2b05e3dbc40af4c23f41172ef1e068a7d651 # v8.8.0
uses: oxsecurity/megalinter@55a59b24a441e0e1943080d4a512d827710d4a9d # v9.2.0
env:
# All available variables are described in documentation
# https://megalinter.github.io/configuration/
Expand All @@ -59,7 +59,7 @@ jobs:
# Upload MegaLinter artifacts
- name: Archive production artifacts
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: MegaLinter reports
path: |
Expand All @@ -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@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
commit-message: "[MegaLinter] Apply linters automatic fixes"
Expand All @@ -90,7 +90,7 @@ jobs:
run: sudo chown -Rc $UID .git/
- name: Commit and push applied linter fixes
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0
with:
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
commit_message: "[MegaLinter] Apply linters fixes"
Original file line number Diff line number Diff line change
Expand Up @@ -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@v7
uses: actions/github-script@v8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down Expand Up @@ -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@v7
uses: actions/github-script@v8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

# Step 2: Checkout the develop branch which contains all approved features
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
ref: develop # Always create releases from develop branch
fetch-depth: 0
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/GitFlow_Make-Release-and-Sync-to-Dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:
# Step 1: Checkout the code from the main branch after merge
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
token: ${{ secrets.GH_PAT_SYNC }}
lfs: "true"
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:

# Step 4: Create stable GitHub release with all artifacts
- name: Create release
uses: ncipollo/release-action@bcfe5470707e8832e12347755757cec0eb3c22af # v1.18.0
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
with:
tag: v${{ steps.release_version.outputs.NextSemVer }}
prerelease: false # This is a stable release
Expand All @@ -141,7 +141,7 @@ jobs:
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT_SYNC }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/GitFlow_Nightly-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
# Step 1: Checkout the develop branch for nightly builds
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
lfs: "true"
fetch-depth: 0
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:

# Step 6: Create GitHub release with all artifacts
- name: Create release
uses: ncipollo/release-action@bcfe5470707e8832e12347755757cec0eb3c22af # v1.18.0
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
if: steps.check_prs.outputs.BUILD_NEEDED == 'true'
with:
tag: v${{ steps.format_version.outputs.NextSemVer }}
Expand Down
54 changes: 50 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,63 @@ Share your mods with the community:<br>
<https://github.com/Romanitho/Winget-AutoUpdate/discussions/categories/mods>

### Winget native parameters
Another finess is the **AppID** followed by the `-override` suffix as a **text file** (.**txt**) that you can place under the **mods** folder.
You can customize winget behavior per-app using **text files** (.**txt**) placed in the **mods** folder:

#### Override (Full installer control)
Use **AppID**`-override.txt` to replace ALL installer arguments (without `-h` silent mode).
> Example:<br>
**Adobe.Acrobat.Reader.64-bit-override.txt** with the content `"-sfx_nu /sAll /rs /msi EULA_ACCEPT=YES DISABLEDESKTOPSHORTCUT=1"`

This will use the **content** of the text file as a native **winget --override** parameter when upgrading.
This uses the **content** as a native **winget --override** parameter when upgrading.

Likewise you can use the **AppID** followed by the `-custom` suffix as a **text file** (.**txt**) that you can place under the **mods** folder (*Arguments to be passed on to the installer in addition to the defaults*).
#### Custom (Add installer arguments)
Use **AppID**`-custom.txt` to add extra arguments to the installer (with `-h` silent mode).
> Example:<br>
**Adobe.Acrobat.Reader.64-bit-custom.txt** with the content `"DISABLEDESKTOPSHORTCUT=1"`

This will use the **content** of the text file as a native **winget --custom** parameter when upgrading.
This uses the **content** as a native **winget --custom** parameter when upgrading.

#### Arguments (Winget-level parameters) ⭐ NEW
Use **AppID**`-arguments.txt` to pass **winget parameters** (not installer arguments, with `-h` silent mode).

💡 **Locale Tip:** Many applications revert to English or system default language during WAU upgrades because winget doesn't remember the original installation locale. To prevent this:
- **Best solution:** Use locale-specific package IDs in `included_apps.txt` (e.g., `Mozilla.Firefox.sv-SE` instead of `Mozilla.Firefox`)
- **Alternative:** Create `{AppID}-arguments.txt` with `--locale` parameter to force language on every upgrade

> Example for language control ([#1073](https://github.com/Romanitho/Winget-AutoUpdate/issues/1073)):<br>
**Mozilla.Firefox-arguments.txt** with the content `--locale pl`<br>
*This prevents Firefox from reverting to English after WAU upgrades.*<br>
*Better solution: Use `Mozilla.Firefox.pl` in included_apps.txt instead of `Mozilla.Firefox`.*

> Example for dependency issues ([#1075](https://github.com/Romanitho/Winget-AutoUpdate/issues/1075)):<br>
**Cloudflare.Warp-arguments.txt** with the content `--skip-dependencies`

> Example with multiple parameters:<br>
**Microsoft.VisualStudio.2022.Community-arguments.txt** with the content `--locale en-US --architecture x64`

**Common use cases:**
- `--locale <locale>` - Force application language (e.g., `pl-PL`, `en-US`, `de-DE`)
- 💡 **Recommended alternative:** Use locale-specific package IDs when available (e.g., `Mozilla.Firefox.sv-SE`, `Mozilla.Firefox.de`, `Mozilla.Firefox.ESR.pl`) to get latest versions
- `--skip-dependencies` - Skip dependency installations when they conflict
- `--architecture <arch>` - Force architecture (`x86`, `x64`, `arm64`)
- `--version <version>` - Pin to specific version
- `--ignore-security-hash` - Bypass hash verification
- `--ignore-local-archive-malware-scan` - Skip AV scanning

⚠️ **Important:** When combining `--locale` and `--version`, the specific version must have an installer available for that locale. Not all versions support all locales. Check available versions with `winget show --id <AppID> --versions`.

💡 **Locale Best Practice:** Search for locale-specific packages with `winget search <AppName>` to see if your language has a dedicated package ID (e.g., `Mozilla.Firefox.sv-SE` for Swedish Firefox). These packages are maintained with the latest versions in your preferred language.

**Command-line usage:** You can also pass arguments when calling `Winget-Install.ps1`:
```powershell
.\winget-install.ps1 -AppIDs "Mozilla.Firefox --locale sv-SE"
.\winget-install.ps1 -AppIDs "7zip.7zip, Notepad++.Notepad++"
.\winget-install.ps1 -AppIDs "Adobe.Acrobat.Reader.64-bit --scope machine --override \"-sfx_nu /sAll /msi EULA_ACCEPT=YES\""
```

**Priority:** Override > Custom > Arguments (file) > Arguments (command-line) > Default

See [_AppID-arguments-template.txt](Sources/Winget-AutoUpdate/mods/_AppID-arguments-template.txt) for more examples.


## Known issues
Expand Down
99 changes: 55 additions & 44 deletions Sources/Winget-AutoUpdate/User-Run.ps1
Original file line number Diff line number Diff line change
@@ -1,73 +1,84 @@
<#
.SYNOPSIS
Handle user interaction from shortcuts and show a Toast notification
Handles user-initiated WAU update checks via shortcut.

.DESCRIPTION
Act on shortcut run
Provides a user-facing interface to manually trigger WAU update checks.
Displays toast notifications for status updates (starting, running,
completed, or error). Waits for the scheduled task to complete and
shows the result.

.EXAMPLE
.\user-run.ps1
.\User-Run.ps1

.NOTES
Triggered by desktop shortcut or Start menu entry.
Uses the Winget-AutoUpdate scheduled task.
Shows error details from logs\error.txt if update check fails.
#>

# Check if WAU is currently running
function Test-WAUisRunning {
If (((Get-ScheduledTask -TaskName 'Winget-AutoUpdate').State -eq 'Running') -or ((Get-ScheduledTask -TaskName 'Winget-AutoUpdate-UserContext').State -eq 'Running')) {
Return $True
}
If (((Get-ScheduledTask -TaskName 'Winget-AutoUpdate').State -eq 'Running') -or ((Get-ScheduledTask -TaskName 'Winget-AutoUpdate-UserContext').State -eq 'Running')) {
Return $True
}
}

<# MAIN #>

#Get Working Dir
# Set working directory
$Script:WorkingDir = $PSScriptRoot

#Load external functions
# Load required functions
. $WorkingDir\functions\Get-NotifLocale.ps1
. $WorkingDir\functions\Start-NotifTask.ps1

#Get Toast Locale function
# Load notification locale
Get-NotifLocale

#Set common variables
# Set common notification parameters
$OnClickAction = "$WorkingDir\logs\updates.log"
$Button1Text = $NotifLocale.local.outputs.output[11].message

try {
#Check if WAU is currently running
if (Test-WAUisRunning) {
$Message = $NotifLocale.local.outputs.output[8].message
$MessageType = "warning"
Start-NotifTask -Message $Message -MessageType $MessageType -Button1Text $Button1Text -Button1Action $OnClickAction -ButtonDismiss -UserRun
break
}
#Run scheduled task
Get-ScheduledTask -TaskName "Winget-AutoUpdate" -ErrorAction Stop | Start-ScheduledTask -ErrorAction Stop
#Starting check - Send notification
$Message = $NotifLocale.local.outputs.output[6].message
$MessageType = "info"
Start-NotifTask -Message $Message -MessageType $MessageType -Button1Text $Button1Text -Button1Action $OnClickAction -ButtonDismiss -UserRun
#Sleep until the task is done
While (Test-WAUisRunning) {
Start-Sleep 3
}
# Check if WAU is already running
if (Test-WAUisRunning) {
$Message = $NotifLocale.local.outputs.output[8].message
$MessageType = "warning"
Start-NotifTask -Message $Message -MessageType $MessageType -Button1Text $Button1Text -Button1Action $OnClickAction -ButtonDismiss -UserRun
break
}

#Test if there was a list_/winget_error
if (Test-Path "$WorkingDir\logs\error.txt") {
$MessageType = "error"
$Critical = Get-Content "$WorkingDir\logs\error.txt" -Raw
$Critical = $Critical.Trim()
$Critical = $Critical.Substring(0, [Math]::Min($Critical.Length, 50))
$Message = "Critical:`n$Critical..."
}
else {
$MessageType = "success"
$Message = $NotifLocale.local.outputs.output[9].message
}
Start-NotifTask -Message $Message -MessageType $MessageType -Button1Text $Button1Text -Button1Action $OnClickAction -ButtonDismiss -UserRun
# Start the WAU scheduled task
Get-ScheduledTask -TaskName "Winget-AutoUpdate" -ErrorAction Stop | Start-ScheduledTask -ErrorAction Stop

# Send "starting" notification
$Message = $NotifLocale.local.outputs.output[6].message
$MessageType = "info"
Start-NotifTask -Message $Message -MessageType $MessageType -Button1Text $Button1Text -Button1Action $OnClickAction -ButtonDismiss -UserRun

# Wait for task completion
While (Test-WAUisRunning) {
Start-Sleep 3
}

# Check for errors in the update process
if (Test-Path "$WorkingDir\logs\error.txt") {
$MessageType = "error"
$Critical = Get-Content "$WorkingDir\logs\error.txt" -Raw
$Critical = $Critical.Trim()
$Critical = $Critical.Substring(0, [Math]::Min($Critical.Length, 50))
$Message = "Critical:`n$Critical..."
}
else {
$MessageType = "success"
$Message = $NotifLocale.local.outputs.output[9].message
}
Start-NotifTask -Message $Message -MessageType $MessageType -Button1Text $Button1Text -Button1Action $OnClickAction -ButtonDismiss -UserRun
}
catch {
#Check failed - Just send notification
$Message = $NotifLocale.local.outputs.output[7].message
$MessageType = "error"
Start-NotifTask -Message $Message -MessageType $MessageType -Button1Text $Button1Text -Button1Action $OnClickAction -ButtonDismiss -UserRun
# Handle task start failure
$Message = $NotifLocale.local.outputs.output[7].message
$MessageType = "error"
Start-NotifTask -Message $Message -MessageType $MessageType -Button1Text $Button1Text -Button1Action $OnClickAction -ButtonDismiss -UserRun
}
26 changes: 20 additions & 6 deletions Sources/Winget-AutoUpdate/WAU-Notify.ps1
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
#Send Notify Script
<#
.SYNOPSIS
Displays a toast notification to the logged-in user.

#get xml notif config
.DESCRIPTION
Reads notification configuration from an XML file and displays
a Windows toast notification using the ToastNotificationManager API.
This script is called by a scheduled task when WAU runs in system context.

.NOTES
Configuration file: config\notif.xml
Launcher ID: Windows.SystemToast.WAU.Notification
#>

# Get WAU installation path from registry
$WAUinstalledPath = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Romanitho\Winget-AutoUpdate\" -Name InstallLocation

# Load notification XML configuration
[xml]$NotifConf = Get-Content "$WAUinstalledPath\config\notif.xml" -Encoding UTF8 -ErrorAction SilentlyContinue
if (!($NotifConf)) {
break
}

#Load Assemblies
# Load Windows notification assemblies
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null

#Prepare XML
# Parse notification XML
$ToastXml = [Windows.Data.Xml.Dom.XmlDocument]::New()
$ToastXml.LoadXml($NotifConf.OuterXml)

#Specify Launcher App ID
# Specify toast launcher ID
$LauncherID = "Windows.SystemToast.WAU.Notification"

#Prepare and Create Toast
# Create and display the notification
$ToastMessage = [Windows.UI.Notifications.ToastNotification]::New($ToastXML)
$ToastMessage.Tag = $NotifConf.toast.tag
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($LauncherID).Show($ToastMessage)
Loading