#21353·vim

Windows installer removes path entry from `PATH`

Author: muellertoCreated Sep 21, 2026Updated Sep 22, 2026
Labelsbug

Steps to reproduce

I use winget to install and update a lot of applications, also Vim. winget does then download a Vim-specific installer and starts it.

For a while now the Windows installer of Vim removes the entry from the PATH variable. This is the case since the location changed from c:\Programs\Vim to c:\Users\<user>\AppData\Local\Programs\Vim.

The directory where the binaries are installed must get an entry in the PATH variable otherwise vim.exe is not usable in a cmd, wt or any other terminal emulator window.

There are two PATH variables: a user specific one and a global one which are later merged. The user specific one is indeed modified by the installer. But the result is that an existing entry is removed and a new one is not added. Note: in case of an update you have already an existing entry and it points exactly to that directory. After the installer has finished and I reopened the terminal window to get a fresh environment vim.exe is not in PATH and I must handle the PATH variable manually, again and again.

Expected behaviour

I would expect the following:

  • if no entry is found in the PATH variable the installer should add one
  • if an entry is found in the PATH variable and it points to
    • the directory where vim.exe is located then it should be unmodified
    • somewhere else it should be replaced by a correct entry

Version of Vim

9.2.1119

Environment

OS: Windows 11 Pro 25H2 terminal: hyper.exe, wt.exe, conemu.exe, cmd.exe (doesn't matter) shell: cmd.exe

Logs and stack traces

bash