zvin
November 30, 2020, 2:23pm
42
‘powershell.exe’ is not recognized as an internal or external command
That is the issue.
Which Windows version are you using ?
Is powershell
available somewhere on that computer ? Check here for example %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
.
Powershell works if I run it outside of cmd.exe it’s just that it is the Powershell 7.1.0-rc.2.
It looks like it uses “pwsh.exe” instead of “powershell.exe”.
That path still exists but I’m guessing it is no longer part of the executable path. It probably got removed when the newer Powershell was installed.
zvin
November 30, 2020, 2:29pm
45
sudo-prompt
relies on powershell.exe
being available in the PATH
.
Do you see a powershell.exe
file n C:\Windows\System32\WindowsPowerShell\v1.0
?
zvin
November 30, 2020, 2:31pm
46
Adding it back should fix the issue https://docs.alfresco.com/4.2/tasks/fot-addpath.html
I’ll try installing 7.1 to see if I get the same issue.
zvin
November 30, 2020, 2:37pm
47
It still works fine here after installing https://github.com/PowerShell/PowerShell/releases/tag/v7.1.0
Does adding powershell.exe back in the PATH fix the issue for you ?
It gets a bit further. But now I get:
'cmd' is not recognized as an internal or external command,\r\noperable program or batch file.
zvin
November 30, 2020, 3:02pm
51
That’s very weird. I wonder what happened to the PATH
on your computer.
You should add back cmd
in it. Normally it should be in C:\WINDOWS\System32\cmd
.
I added System32 to the PATH and etcher is once again flashing.
I think this is part of the Windows Terminal/new Powershell install. I seem to recall it warned me it was going to do some re-working of paths. I could be wrong. It was a looong while ago that I installed Windows Terminal.
Same for Powershell Beta. It was a loong time ago that I started using it, I think it overrode the normal PS pathing.
zvin
November 30, 2020, 3:09pm
54
Thanks again for reporting this Ray !
I’m glad it’s fixed for you.
We’ll see if we get similar reports in the future.
It was a weird one for sure but it works now. I just flashed an image and it finished with no complaints.
I also had this happen today and had to add both:
C:\Windows\System32\WindowsPowerShell\v1.0
C:\Windows\System32
Back into the PATH using the environment variables editor… I don’t recall ever deleting anything out of PATH. Possibly a side effect of a program install? Anyway all is good now.