Skip to content

Day 0 Update: Self-update on first command when client is outdated #6298

Description

@denelon

Relevant area(s)

WinGet CLI

Description of the new feature / enhancement

Day 0 Update — When the first command requiring the source index is executed (e.g., winget install, winget upgrade, winget search, or winget configure), WinGet should check whether a newer stable version of the client is available and prompt the user to update before proceeding.

This addresses several chicken-and-egg problems:

  • A user installs WinGet (or gets it via Windows) but the version is already outdated by the time they first use it.
  • New features (e.g., winget configure) require a recent client, but users don't know they need to update first.
  • The winget configure enable step should be unnecessary if the first command executed is winget configure on a client that supports it natively — but today users hit "unrecognized command" errors because their client is too old.

Proposed behavior:

  1. The preIndexed package source includes metadata indicating the "latest stable" client version.
  2. On first command execution requiring the index, WinGet compares its own version against the advertised latest.
  3. If outdated, WinGet informs the user in the current terminal window that an update is needed.
  4. WinGet shuts down, updates itself, then relaunches in a new window with the original command (using --wait so the new window doesn't close immediately).
  5. The user sees their original command execute on the updated client.

This eliminates the "install WinGet, then immediately need to update WinGet" friction and removes barriers to new functionality adoption.

Proposed technical implementation details

  • Add a latestStableVersion field to the preIndexed package source metadata.
  • Client version comparison on first index access per session.
  • Self-update flow: notify user → close current process → trigger update (via Microsoft Store or direct package) → relaunch with original arguments + --wait.
  • Group Policy controls: EnableDay0Update (toggle), Day0UpdateSource (Store vs. direct).
  • Settings: day0Update.enabled, day0Update.dismissCount (allow N dismissals before suppressing).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-FeatureThis is a feature request for the Windows Package Manager client.
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions