How arelius-d/fedupdate works
Purpose and entry points
FedUpDate is a Windows 11 update-control suite that consolidates Windows Update/Defender, WinGet, and Microsoft Store updates while enforcing user-selected update-service policies and supporting rollback. The main dispatcher is fedupdate.ps1, with terminal compatibility through fedupdate.cmd and silent GUI launch through fedupdate-gui.vbs. Installation, upgrade, and removal lifecycle actions start in install.ps1.
Core orchestration
core/Engine.psm1 is the application-level coordinator: it loads shared configuration/logging and routes CLI operations such as scan, update, watchdog, rollback, scheduling, versioning, and self-update. fedupdate.ps1 selects CLI, TUI, or GUI execution mode and passes command intent into the core. Shared persistent behavior is controlled by core/Config.ps1; operational events are emitted through core/Logger.ps1.
Unified update pipeline
The update flow has three independently invocable rings, coordinated for update -All:
• OS and Defender updates: core/OSUpdateEngine.ps1, using Windows Update Agent COM and Defender tooling.
• Third-party application discovery/upgrades: core/WingetEngine.ps1, invoking and interpreting winget.exe.
• Store application synchronization: core/StoreEngine.ps1, using Windows MDM/CIM update-scan facilities.
The orchestration boundary permits one-ring updates or a full sequence, and supports -WhatIf to propagate simulation semantics without state mutation.
State protection and rollback
core/AntiTamperWatchdog.ps1 audits and enforces selected service/task policies around Windows update behavior, including an on-boot scheduled enforcement guard. Any managed registry, service, or task changes must pass through the state-recording boundary in core/RollbackEngine.ps1, which maintains the reversible ledger and restores latest, all, or selected transactions. This makes policy enforcement distinct from update installation: updates may run while persistent system-control changes remain auditable and reversible.
Restart and automation control
core/RebootEngine.ps1 evaluates multiple Windows pending-restart indicators and applies configured or per-run reboot policy after update work. It intentionally distinguishes actionable servicing reboots from ordinary installer cleanup. core/Scheduler.ps1 owns Windows Task Scheduler registration/removal for recurring automated runs; scheduled work re-enters the same core command pipeline rather than duplicating update logic.
Interface adapters
The ANSI terminal dashboard in tui/TuiEngine.ps1 is an interactive adapter over core operations. The desktop application is a local desktop-hosted web UI: gui/src/Program.cs supplies the native WPF/WebView2 host, gui/Server.ps1 provides the local HTTP/IPC bridge to PowerShell operations, and gui/app.js manages browser-side state and commands. UI layers should remain clients of the core rather than directly altering update or rollback state.
Runtime and external boundaries
The system runs primarily in Windows PowerShell, Windows service/task/registry APIs, CIM/WMI, and Windows Update COM. External executables/services include winget.exe, Defender’s MpCmdRun.exe, Microsoft Store/MDM facilities, and Windows Task Scheduler. Desktop GUI build/runtime depends on the Windows C# compiler and Microsoft WebView2 libraries, assembled through gui/build.ps1 and gui/SetupLibs.ps1.
Main entry points: Engine.psm1 Application coordinator · AntiTamperWatchdog.ps1 Policy watchdog · Scheduler.ps1 Automation scheduler · OSUpdateEngine.ps1 OS & Defender updates
Components 20
Entry & lifecycle
- PowerShell dispatcher · Selects CLI, TUI, or GUI mode.
fedupdate.ps1 - CMD compatibility
fedupdate.cmd - Silent GUI launcher
fedupdate-gui.vbs - Install lifecycle · Installs, upgrades, and removes the suite.
install.ps1
Core control
- Application coordinator · Routes commands and coordinates shared services.
core/Engine.psm1 - Persistent configuration
core/Config.ps1 - Operational logging
core/Logger.ps1 - Policy watchdog · Audits and enforces update service and task policies.
core/AntiTamperWatchdog.ps1 - Rollback ledger · Records managed changes and restores transactions.
core/RollbackEngine.ps1 - Restart policy · Evaluates pending restart indicators after update work.
core/RebootEngine.ps1 - Automation scheduler · Registers recurring runs that re-enter the command pipeline.
core/Scheduler.ps1
Update rings
- OS & Defender updates
core/OSUpdateEngine.ps1 - Third-party app updates
core/WingetEngine.ps1 - Store app updates
core/StoreEngine.ps1
Interface adapters
- ANSI terminal dashboard
tui/TuiEngine.ps1 - WPF/WebView2 host
gui/src/Program.cs - Local GUI bridge
gui/Server.ps1 - Browser UI
gui/app.js
Windows & external boundaries
- Windows update & policy APIs · COM, CIM/WMI, registry, services, and Task Scheduler.
- Update executables & services · winget, Defender tooling, and Store/MDM facilities.
Connections 28
- CMD compatibility → PowerShell dispatcher: launches
- Silent GUI launcher → PowerShell dispatcher: launches GUI mode
- PowerShell dispatcher → Application coordinator: passes command intent
- Install lifecycle → Application coordinator: installs and upgrades
- Application coordinator → Persistent configuration: loads policy
- Application coordinator → Operational logging: emits events
- Application coordinator → OS & Defender updates: runs OS ring
- Application coordinator → Third-party app updates: runs app ring
- Application coordinator → Store app updates: runs Store ring
- Application coordinator → Policy watchdog: controls enforcement
- Application coordinator → Rollback ledger: requests rollback
- Application coordinator → Restart policy: applies reboot policy
- Application coordinator → Automation scheduler: manages automation
- Policy watchdog → Rollback ledger: records managed changes
- Policy watchdog → Windows update & policy APIs: enforces services and tasks
- Rollback ledger → Windows update & policy APIs: restores system state
- Restart policy → Windows update & policy APIs: reads restart indicators
- Automation scheduler → Windows update & policy APIs: registers scheduled tasks
- Automation scheduler → Application coordinator: scheduled re-entry
- OS & Defender updates → Windows update & policy APIs: uses Update COM
- OS & Defender updates → Update executables & services: runs Defender tooling
- Third-party app updates → Update executables & services: invokes winget
- Store app updates → Update executables & services: uses Store/MDM scan
- ANSI terminal dashboard → Application coordinator: invokes core commands
- Browser UI → Local GUI bridge: sends UI commands
- Local GUI bridge → Application coordinator: bridges operations
- WPF/WebView2 host → Browser UI: hosts
- WPF/WebView2 host → Local GUI bridge: hosts local bridge