Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

> I have re-installed powershell through windows components menu, but still got this error #13

Closed
Rush-abh opened this issue Dec 14, 2020 · 3 comments

Comments

@Rush-abh
Copy link

I have re-installed powershell through windows components menu, but still got this error

==== ERROR ====

Powershell is not installed in the system.
Aborting...

Something is wrong with PowerShell path in the system,

anyway for now, you can change the command to make it work.

find,
for %%i in (powershell.exe) do if "%%~$path:i"=="" (
and replace it with,
if not exist "%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" (

Originally posted by @WindowsAddict in #2 (comment)

@Rush-abh
Copy link
Author

mas

getting this error after changing command.

@WindowsAddict
Copy link
Member

@Rush-abh

System path variables are messed up in your system that is why 'powershell' command is failing.
You can check if the path is correct are or not with this command, check if you see the highlighted text in your system.

image

As a temp fix for the script, you can add the below commands after line number 2 (In AIO and separate files version)

set "SysPath=%SystemRoot%\System32"
if exist "%SystemRoot%\Sysnative\reg.exe" (set "SysPath=%SystemRoot%\Sysnative")
set "Path=%SysPath%;%SystemRoot%;%SysPath%\Wbem;%SystemRoot%\System32\WindowsPowerShell\v1.0"

@AxelEric
Copy link

Hey there..

you also may forget about 'Windows Powershell' and install Powershell from the GitHub Powershell repo, that you can download from THIS page.
Enjoy!
AxelEric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants