I have (what I think is) a bit of weird case
For some reason, powershell, wont properly execute windows commands that are on my path (like for example compilers)
So for example, I install the rust compiler, so if I type
I get the error commnd not found:
cargo : The term 'cargo' is not recognized as the name of a cmdlet, function, script file, or operable program.
But if i type
the command does get executed, but it gets executed as if in sub-process, so it does get executed in-line in my shell
Weirdness doesnt stop here
Also i checked the $env:path variable, it is fine, and again proof of this, is that cargo.exe does .. kinda .. work
Is there a setting, that I changed for some reason, and forgot about that is causing this behavior
I cannot think of any setting off the top of my head, you could have done on purpose / by accident, via the Console Host, ISE or VSCode terminal that would cause what you are seeing.
However, if you are using external commands, you really need to add the extension (in most cases a .exe) to avoid any confusion about what you are trying to run.
Also, in general they must approach a specific way. Here are two articles on the topic.
thanks for the links
i know that calling windows commands, was working before, but suddenly it stopped
but as i say, what is weird, is that on the same machine, the user with admin privilige work fine
So, this fail is when you are calling your commands from the console host, the ISE or in VSCode?
You can run code in the console host and the ISE to reset them back to their defaults to see if that resolves you issues.
You can get the default settings from any other machine, and use that to reset yours.
If you are using profiles in each, either remove them, are start PoSH using the -noprofile parameter.
PS C:\Users\...\bin> Test-Path $profile False
it seems i dont even have a profile set, for this to be possibly a settings issues
I installed powershell 6
windows command wont execute, with my none admin account, unless i add the .exe part
pwsh6 is only different from powershell 5 in that windows command (after i added their extension) will execute in
again, to be clear, my account with admin privileges works fine
it fixed itself, or i fixed it, i have no clue
the computer also coincidentally installed some windows updates
but now i no longer have this issue
You must be logged in to reply to this topic.