Skip to content

Bug: No wait for PowerToys exit after WM_CLOSE before launching installer #46966

@crutkas

Description

@crutkas

Description

InstallNewVersionStage1 in PowerToys.Update.cpp sends WM_CLOSE to the PowerToys tray window but immediately proceeds to launch the installer via Stage 2 without waiting for the PT process to actually exit.

Steps to Reproduce

  1. PowerToys is running with modules loaded (FancyZones, MWB, etc.)
  2. Update triggers Stage 1
  3. WM_CLOSE is sent but PT hasn't fully shut down yet
  4. Stage 2 launches installer which tries to replace files still in use

Impact

Intermittent install failures due to file-in-use errors.

Fix

After SendMessageW(WM_CLOSE), wait for the PT process handle to exit before launching Stage 2.

Found during multi-agent code review of #46889.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions