Skip to content

feat: Add update deadline prompt system#1132

Open
rtylerdavis wants to merge 2 commits intoRomanitho:developfrom
rtylerdavis:feature/update-deadline-prompt
Open

feat: Add update deadline prompt system#1132
rtylerdavis wants to merge 2 commits intoRomanitho:developfrom
rtylerdavis:feature/update-deadline-prompt

Conversation

@rtylerdavis
Copy link

Summary

Implements the update deadline prompt system proposed in #1130. When WAU_UpdateDeadlineDays is configured, WAU presents a WPF dialog to logged-in users listing pending updates with per-app deadlines instead of silently installing. Fully backward-compatible -- zero effect when not configured.

Update Prompt Dialog

Features

  • Per-app deadline tracking (clock starts on first detection, never resets on version bumps)
  • WPF dialog via ServiceUI.exe with per-app selective update checkboxes
  • Final-day enforcement: apps due today are auto-checked, locked, highlighted in red -- Remind button hidden
  • Color-coded urgency (red for today/overdue, amber for 1-3 days, white for 4+)
  • Configurable reminder interval (WAU_ReminderIntervalDays)
  • Custom company branding (WAU_CompanyName)
  • User-context app support (respects WAU_UserContext)
  • Whitelist/blacklist respected in deadline tracking
  • Self-healing: stale entries purged automatically, failed updates preserved for retry
  • X button blocked, auto-dismiss timer

Configuration

Setting Default Description
WAU_UpdateDeadlineDays 0 (disabled) Days from first detection to forced update
WAU_ReminderIntervalDays 2 Days between reminder prompts
WAU_CompanyName (empty) Company name in prompt header

Dedicated WAU-Notifier.admx/.adml included for Intune/GPO deployment. Uses a separate ADMX namespace (WAUNotifier.Policies) to coexist with the existing WAU.admx. The three settings are also added to the upstream WAU.admx/.adml for single-file deployments.

Files Changed

Modified:

  • Winget-Upgrade.ps1 -- deadline mode if/else branch around main update loop
  • config/WAU-MSI_Actions.ps1 -- registers/unregisters UpdatePrompt and UpdateNow tasks

New:

  • WAU-UpdatePrompt.ps1 -- WPF dialog, user interaction, partial update logic
  • WAU-UpdateNow.ps1 -- processes updates from pending-updates.json
  • functions/Get-UpdateDeadlines.ps1 -- reads/purges deadline registry entries
  • functions/Set-UpdateDeadline.ps1 -- creates/updates deadline entries
  • functions/Start-UpdatePromptTask.ps1 -- writes JSON, fires prompt task
  • WAU-Notifier.admx / WAU-Notifier.adml -- ADMX policy definitions

Testing

Tested on x64 and ARM64 (Snapdragon Surface Laptop) via both manual install and Intune deployment. Full test plan covering install/uninstall lifecycle, deadline creation, prompt interaction, overdue enforcement, user-context apps, whitelist/blacklist, ADMX policy delivery, and edge cases.


Related: #1121

Romanitho and others added 2 commits February 28, 2026 00:47
Adds configurable update deadline enforcement to WAU. When
WAU_UpdateDeadlineDays > 0, instead of silently installing updates,
WAU tracks deadlines per-app and presents a WPF dialog to the user
with options to update now, select specific apps, or snooze.

New files:
- WAU-UpdatePrompt.ps1: WPF dialog via ServiceUI.exe
- WAU-UpdateNow.ps1: processes user-initiated updates
- functions/Get-UpdateDeadlines.ps1: reads/purges deadline registry
- functions/Set-UpdateDeadline.ps1: creates/updates deadline entries
- functions/Start-UpdatePromptTask.ps1: writes JSON, fires prompt task
- WAU-Notifier.admx/adml: ADMX policy definitions for Intune/GPO

Modified files:
- Winget-Upgrade.ps1: deadline mode branch around main update loop
- WAU-MSI_Actions.ps1: registers UpdatePrompt and UpdateNow tasks

Features:
- Per-app deadline clock (never resets on version bumps)
- Per-app selective update via checkboxes
- Final-day enforcement: auto-checked, locked, red highlight, no snooze
- Color-coded urgency (red/amber/white)
- User-context app support
- Whitelist/blacklist respected
- Custom company branding (WAU_CompanyName)
- Self-healing (stale entries purged automatically)
- X button blocked, auto-dismiss timer

Resolves Romanitho#1121. See Romanitho#1130 for full proposal.
@github-actions github-actions bot added the invalid-branch Invalid branch label Mar 11, 2026
@rtylerdavis rtylerdavis changed the base branch from main to develop March 11, 2026 05:20
@github-actions github-actions bot removed the invalid-branch Invalid branch label Mar 11, 2026
@Romanitho
Copy link
Owner

Nice, massive piece of work! I'll need some time to review and approve the code. It won't be part of the next release, but I'll target the one after that.
As mentioned, I’m also starting a new repo for the C# version. This is a new challenge for me, and I’m planning to rewrite the code to keep WAU’s core functionality while improving the overall logic.
Since the project began, many things have evolved and features were added over time; I think the move to C# is the perfect opportunity for a full refactor. I specifically want to use the Winget COM API to make the agent simpler and more robust. This deadline prompt system would, of course, become a central feature of the new WAU agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants