After installing Node.js with the Windows installer, I found a malformed entry in the system `PATH`:
;C:\Program Files\nodejs
It has a trailing double quote, so it does not point to the Node.js installation directory. The correct entry should be:
C:\Program Files\nodejs\
When a process inherits the malformed entry without the valid one, commands such as `npx` cannot be resolved, even though `npx.cmd` is present in the installation directory.
### Steps to reproduce
1. Install Node.js using the Windows installer.
2. Inspect the system `PATH`.
3. Check whether it contains `;C:\Program Files\nodejs`.
4. With that entry in the process `PATH`, run `where.exe npx`.
### Actual result
`where.exe npx` cannot find `npx`, although `C:\Program Files\nodejs\npx.cmd` exists.
### Expected result
The installer should add the correct Node.js directory to `PATH` without a trailing quote.
Version
24.21.0
Platform
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
C:\Program Files\nodejs
What do you see instead?
;C:\Program Files\nodejs
Additional information
No response