#951·edit

Windows 11: installed Edit is shadowed by the inbox System32 edit.exe

Author: ywenhaoCreated Sep 13, 2026Updated Sep 13, 2026

I am seeing the same problem on Windows 11 after installing the current Microsoft Edit release according to the repository instructions.

Reproduction

  1. Install the newer Microsoft Edit release (for example, 2.0.0) through the documented installation method.
  2. Open a new PowerShell terminal and run edit.
  3. edit still resolves to C:\Windows\System32\edit.exe (the older inbox version, 1.2.1), because the System32 entry has higher PATH precedence than the newly installed version-specific directory.
  4. Get-Command edit.exe -All shows both executables, but the old system copy is selected first.

This means a normal edit invocation does not use the installed update, even though the installation completed successfully. The PATH workaround is also fragile because the package directory changes on every version update.

For now I have to add a function to my PowerShell $PROFILE that selects the newest installed executable by version:

powershell
function edit {
    $edit = Get-Command edit.exe -All |
        Where-Object {
            $_.Version -ge [version]'2.0.0.0'
        } |
        Sort-Object Version -Descending |
        Select-Object -First 1

    if ($edit) {
        & $edit.Source @args
    }
    else {
        & "$env:WINDIR\System32\edit.exe" @args
    }
}

Could the Windows distribution provide a stable shim/link directory or otherwise ensure that the current installed edit.exe takes precedence over the inbox System32 copy? The fix should continue working across upgrades without requiring users to edit PATH or their PowerShell profile each time.

Related issues

  • #829 - Winget package path includes a version number, causing PATH conflicts and update breakage
  • #860 - How to perfectly install a new version of edit on Windows 11?