Skip to content

Bug: CopySelfToTempDir uses fixed temp path causing collision #46967

@crutkas

Description

@crutkas

Description

CopySelfToTempDir in PowerToys.Update.cpp always writes to %TEMP%\PowerToys.Update.exe. Concurrent update processes overwrite each other's temp binary.

Impact

Low - requires concurrent update attempts which is rare.

Fix

Use a unique temp filename (e.g., append PID or GUID).

Found during multi-agent code review of #46889.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Setup/InstallRefers to installation mechanismProduct-GeneralRefers to general PowerToys functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions