PATH commands not working lonely. #20161

Closed
opened 2026-01-31 07:05:25 +00:00 by claunia · 8 comments
Owner

Originally created by @rvneXe on GitHub (Jun 28, 2023).

Windows Terminal version

1.17.11461.0

Windows build number

10.0.19043.0

Other Software

No response

Steps to reproduce

I opened the terminal, typed "ping" command, then got this error:

PS C:\Windows\system32> ping
ping : The term 'ping' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ ping
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (ping:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


Suggestion [3,General]: The command ping was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\ping". See "get-help about_Command_Precedence" for more details.

So, I have to use ".\ping" for it to work.
I've tested it with PowerShell and cmd.exe themselves and PATH commands are working fine, But they have issues in the windows terminal

Expected Behavior

The "ping" command itself (without dot and backslash) should work as a command too.

Actual Behavior

The error that I mentioned it earlier.

Originally created by @rvneXe on GitHub (Jun 28, 2023). ### Windows Terminal version 1.17.11461.0 ### Windows build number 10.0.19043.0 ### Other Software _No response_ ### Steps to reproduce I opened the terminal, typed "ping" command, then got this error: ``` PS C:\Windows\system32> ping ping : The term 'ping' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + ping + ~~~~ + CategoryInfo : ObjectNotFound: (ping:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Suggestion [3,General]: The command ping was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\ping". See "get-help about_Command_Precedence" for more details. ``` So, I have to use ".\ping" for it to work. I've tested it with PowerShell and cmd.exe themselves and PATH commands are working fine, But they have issues in the windows terminal ### Expected Behavior The "ping" command itself (without dot and backslash) should work as a command too. ### Actual Behavior The error that I mentioned it earlier.
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 07:05:25 +00:00
Author
Owner

@lhecker commented on GitHub (Jun 28, 2023):

What does your $env variable in PowerShell contain? You can strip out anything that you consider private data.

@lhecker commented on GitHub (Jun 28, 2023): What does your `$env` variable in PowerShell contain? You can strip out anything that you consider private data.
Author
Owner

@rvneXe commented on GitHub (Jul 1, 2023):

Name                           Value
----                           -----
ACSetupSvcPort                 23210
ACSvcPort                      17532
ALLUSERSPROFILE                C:\ProgramData
APPDATA                        C:\Users\Raven\AppData\Roaming
CommonProgramFiles             C:\Program Files\Common Files
CommonProgramFiles(x86)        C:\Program Files (x86)\Common Files
CommonProgramW6432             C:\Program Files\Common Files
COMPUTERNAME                   DESKTOP-FAU54K4
ComSpec                        C:\Windows\system32\cmd.exe
DriverData                     C:\Windows\System32\Drivers\DriverData
HOMEDRIVE                      C:
HOMEPATH                       \Users\Raven
INTEL_DEV_REDIST               C:\Program Files (x86)\Common Files\Intel\Shared Libraries\
JAVA_HOME                      X:\Program Files\jdk-17.0.2
LOCALAPPDATA                   C:\Users\Raven\AppData\Local
LOGONSERVER                    \\DESKTOP-FAU54K4
MIC_LD_LIBRARY_PATH            C:\Program Files (x86)\Common Files\Intel\Shared Libraries\compiler\lib\mic
NUMBER_OF_PROCESSORS           8
OS                             Windows_NT
Path                           C:\Users\Raven\AppData\Local\Microsoft\WindowsApps;C:\Users\Raven\AppData\Local\GitHu...
PATHEXT                        .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW;.CPL
PROCESSOR_ARCHITECTURE         AMD64
PROCESSOR_IDENTIFIER           Intel64 Family 6 Model 165 Stepping 3, GenuineIntel
PROCESSOR_LEVEL                6
PROCESSOR_REVISION             a503
ProgramData                    C:\ProgramData
ProgramFiles                   C:\Program Files
ProgramFiles(x86)              C:\Program Files (x86)
ProgramW6432                   C:\Program Files
PSModulePath                   C:\Users\Raven\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell...
PUBLIC                         C:\Users\Public
RlsSvcPort                     22112
SystemDrive                    C:
SystemRoot                     C:\Windows
TEMP                           C:\Users\Raven\AppData\Local\Temp
TMP                            C:\Users\Raven\AppData\Local\Temp
USERDOMAIN                     DESKTOP-FAU54K4
USERDOMAIN_ROAMINGPROFILE      DESKTOP-FAU54K4
USERNAME                       Raven
USERPROFILE                    C:\Users\Raven
windir                         C:\Windows
WSLENV                         WT_SESSION::WT_PROFILE_ID
WT_PROFILE_ID                  {61c54bbd-c2c6-5271-96e7-009a87ff44bf}
WT_SESSION                     43d8e0e5-7679-43f3-9943-1654f11e5fc9
@rvneXe commented on GitHub (Jul 1, 2023): ``` Name Value ---- ----- ACSetupSvcPort 23210 ACSvcPort 17532 ALLUSERSPROFILE C:\ProgramData APPDATA C:\Users\Raven\AppData\Roaming CommonProgramFiles C:\Program Files\Common Files CommonProgramFiles(x86) C:\Program Files (x86)\Common Files CommonProgramW6432 C:\Program Files\Common Files COMPUTERNAME DESKTOP-FAU54K4 ComSpec C:\Windows\system32\cmd.exe DriverData C:\Windows\System32\Drivers\DriverData HOMEDRIVE C: HOMEPATH \Users\Raven INTEL_DEV_REDIST C:\Program Files (x86)\Common Files\Intel\Shared Libraries\ JAVA_HOME X:\Program Files\jdk-17.0.2 LOCALAPPDATA C:\Users\Raven\AppData\Local LOGONSERVER \\DESKTOP-FAU54K4 MIC_LD_LIBRARY_PATH C:\Program Files (x86)\Common Files\Intel\Shared Libraries\compiler\lib\mic NUMBER_OF_PROCESSORS 8 OS Windows_NT Path C:\Users\Raven\AppData\Local\Microsoft\WindowsApps;C:\Users\Raven\AppData\Local\GitHu... PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW;.CPL PROCESSOR_ARCHITECTURE AMD64 PROCESSOR_IDENTIFIER Intel64 Family 6 Model 165 Stepping 3, GenuineIntel PROCESSOR_LEVEL 6 PROCESSOR_REVISION a503 ProgramData C:\ProgramData ProgramFiles C:\Program Files ProgramFiles(x86) C:\Program Files (x86) ProgramW6432 C:\Program Files PSModulePath C:\Users\Raven\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell... PUBLIC C:\Users\Public RlsSvcPort 22112 SystemDrive C: SystemRoot C:\Windows TEMP C:\Users\Raven\AppData\Local\Temp TMP C:\Users\Raven\AppData\Local\Temp USERDOMAIN DESKTOP-FAU54K4 USERDOMAIN_ROAMINGPROFILE DESKTOP-FAU54K4 USERNAME Raven USERPROFILE C:\Users\Raven windir C:\Windows WSLENV WT_SESSION::WT_PROFILE_ID WT_PROFILE_ID {61c54bbd-c2c6-5271-96e7-009a87ff44bf} WT_SESSION 43d8e0e5-7679-43f3-9943-1654f11e5fc9 ```
Author
Owner

@zadjii commented on GitHub (Jul 1, 2023):

Can you try the 1.18 Preview build? That fairly substantially changed up how Terminal loads the environment

@zadjii commented on GitHub (Jul 1, 2023): Can you try the 1.18 Preview build? That fairly substantially changed up how Terminal loads the environment
Author
Owner

@anuraghit commented on GitHub (Jul 1, 2023):

it's not working also

@anuraghit commented on GitHub (Jul 1, 2023): it's not working also
Author
Owner

@zadjii-msft commented on GitHub (Jul 5, 2023):

What does the output of $env:Path look like/? Weird that this works in pwsh in conhost but not Terminal. My only theory is that Terminal's launching with different env vars.

(but also if 1.18 doesn't work then that doesn't seem likely either.... hmm...)

@zadjii-msft commented on GitHub (Jul 5, 2023): What does the output of `$env:Path` look like/? Weird that this works in pwsh in conhost but not Terminal. My only theory is that Terminal's launching with different env vars. (but also if 1.18 doesn't work then that doesn't seem likely either.... hmm...)
Author
Owner

@ALERTua commented on GitHub (Jul 5, 2023):

Same here.
C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.18.1462.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe

C:\Users\alexe>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\alexe\AppData\Roaming
ChocolateyInstall=C:\ProgramData\chocolatey
ChocolateyLastPathUpdate=133327802124098935
ChocolateyToolsLocation=C:\tools
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=ALERT_WHITE
ComSpec=C:\WINDOWS\system32\cmd.exe
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC
PROMPT=$P$G

C:\Users\alexe>

In the meantime: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe displays the environment variables in full scale, correcty.

@ALERTua commented on GitHub (Jul 5, 2023): Same here. `C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.18.1462.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe` ``` C:\Users\alexe>set ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\alexe\AppData\Roaming ChocolateyInstall=C:\ProgramData\chocolatey ChocolateyLastPathUpdate=133327802124098935 ChocolateyToolsLocation=C:\tools CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=ALERT_WHITE ComSpec=C:\WINDOWS\system32\cmd.exe PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC PROMPT=$P$G C:\Users\alexe> ``` In the meantime: `C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe` displays the environment variables in full scale, correcty.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Jul 9, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (Jul 9, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@rvneXe commented on GitHub (Jul 12, 2023):

Can you try the 1.18 Preview build? That fairly substantially changed up how Terminal loads the environment

Yeah, It Works.
Thanks

@rvneXe commented on GitHub (Jul 12, 2023): > Can you try the 1.18 Preview build? That fairly substantially changed up how Terminal loads the environment Yeah, It Works. Thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20161