启动Windows Terminal,发现打开无法使用,显示以下错误:

[启动“powershell.exe”时出现错误 0x80070002]
错误

解决方法如下:

1. 打开windows菜单:
win

2. 直接搜索环境变量,打开
搜索环境变量
3. 找到Path一行,点击编辑
Path

4. 在改行末尾输入以下内容(注意末尾是英文字符的分号):

C:\Windows\System32\WindowsPowerShell\v1.0;

输入

6. 点击保存,再次打开Windows Terminal,成功开启
成功

总结

导致错误的原因是因为安装Windows Terminal的时候未添加系统环境变量,添加以下就行了,win10在菜单栏直接搜索环境变量就能快捷打开环境变量进行编辑了。

GitHub 加速计划 / term / terminal
94.53 K
8.17 K
下载
The new Windows Terminal and the original Windows console host, all in the same place!
最近提交(Master分支:2 个月前 )
06890671 `pathTranslationStyle` has four options: - `none`: Do no translation - `wsl`: Translate `C:\` to `/mnt/c` and `\\wsl$\Foo\bar` to `/bar` - `cygwin`: Translate `C:\` to `/cygdrive/c` - `msys2`: Translate `C:\` to `/c` It is intended as a broadly-supported replacement for us checking the source every time the user drops a path. We no longer need to push the source name all the way down to the control. I am hesitant to commit to using other folks' product names in our settings model, however, these are almost certainly more recognizable than whatever other weird names we could come up with. The Git Bash fragment extension profile could conceivably use `pathTranslationStyle` `msys2` to make sure drag/dropped paths look right. 5 天前
90866c7c The original intent with dynamic profiles was that they could be uninstalled but that Terminal would remember your settings in case they ever came back. After we implemented dynamic profile _deletion_, however, we accidentally made it so that saving your settings after a dynamic profile disappeared scoured it from the planet _forever_ (since we remembered that we generated it, but now it was no longer in the settings file). This pull request implements: - Tracking for orphaned dynamic profiles - A new settings page for the profile that explains what happened - Badging on the Navigation Menu indicating which profiles are orphaned and which are hidden Closes #14061 Closes #11510 Refs #13916 Refs #9997 5 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐