Case study · Windows driver automation

The problem, the limitations, the infrastructure, and what I learned.

← All projects
WINDOWS DRIVER AUTOMATION · stable

DRIVER UPDATER

A PowerShell tool that inventories every installed driver on Windows 11, queries Windows Update for vendor versions, installs what is available, and broadcasts progress to the desktop. Runs as a hidden scheduled task at startup and on session unlock.

powershellwindowsautomationscheduled-task
OUTCOME

Hands-off driver maintenance with a rollback path and a readable log of every pass.

// problem

Keep drivers current on a fresh Windows 11 machine without manual checking, and make the install safe to roll back.

// limitations

  • Must run unattended as SYSTEM.
  • Must be reversible via a restore point.

// infrastructure used

  • A preflight check verifies the OS, the Windows Update COM API, desktop messaging, and the registry policies that silently block updates.
  • The installer optionally enables System Protection so a restore point exists before any change.
  • The worker runs as SYSTEM on a hidden scheduled task and broadcasts progress at four checkpoints.
  • Logs are retained for a configurable window; uninstall restores policy and removes the task.

// lessons learned

  1. 01
    Restore points silently did nothing.

    System Protection is off on many Windows 11 installs, and the restore point command succeeds without creating anything. The installer now detects that and can require a restore point.

  2. 02
    Registry policies blocked updates without an error.

    Two policies can stop driver updates silently, so the preflight check looks for them first.

  3. 03
    One failed run disabled updates for a day.

    A failure at boot used up the 24-hour window. Failed passes now retry after an hour instead.

  4. 04
    The unlock trigger has no PowerShell command.

    The task is registered from XML, and the XML is validated before registering so a bad trigger fails at install, not at the next boot.

  5. 05
    A pending reboot blocked further installs.

    Once one driver needs a restart, Windows refuses the rest. Those are now reported as deferred instead of failed.

View source ↗