where
shows cmd.exe
on the Windows search path
, not where where cmd.exe
is running from. Example: on my system there is a difference on where procexp.exe
is running from (C:\ProgramData\chocolatey\lib\sysinternals\tools\procexp.exe
) and where procexp.exe
is on the path
(C:\ProgramData\chocolatey\bin\procexp.exe
).