LeeReamond
V2EX  ›  问与答

如何在不按住 shift 的情况下也能在 windows10 右键菜单中显示用 powershell 打开?

  •  
  •   LeeReamond · Apr 14, 2021 · 2284 views
    This topic created in 2050 days ago, the information mentioned may be changed or developed.

    如题,powershell 虽然拉胯,但不得不说 windows 平台上还是比一众第三方 shell 启动速度都快。

    我记得 windows 上通过修改注册表是可以实现右键直接打开,不用按 shift 的,但是忘记修改方法了,刚才百度搜了半天也没搜到信息,可能是关键字不对。v2 有没有老哥有相关改法的?

    18 replies  •  2021-04-15 16:34:21 +08:00
    Juicpt
    Juicpt
    Apr 14, 2021
    1
    装一个 Windows Terminal ?
    SuperMild
    SuperMild
    Apr 14, 2021
    3
    装 Windows Terminal 吧,启动速度也是很快。
    Lunatic1
    Lunatic1
    Apr 14, 2021
    4
    确实,按住 shift 确实麻烦
    Jirajine
    Jirajine
    Apr 14, 2021 via Android
    5
    PowerShell 启动速度很糟糕,你觉得比其他的快是因为其他的那些不是 win 原生的程序。
    elvish 、nushell 等原生跨平台的 shell 启动都比 pwsh 快。
    ysc3839
    ysc3839
    Apr 14, 2021 via Android❤️1
    6
    去注册表 HKEY_CLASSES_ROOT\Directory\Background\shell 下面看看吧,我现在没用电脑,不知道具体是哪个。
    LeeReamond
    LeeReamond
    OP
    Apr 14, 2021
    7
    @Juicpt terminal 启动还是慢的,虽然确实挺好用的
    creanme
    creanme
    Apr 14, 2021
    8
    HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell 删掉 Extended
    limuyan44
    limuyan44
    Apr 14, 2021
    9
    google 第一条
    open powershell without shift key
    abersheeran
    abersheeran
    Apr 14, 2021
    10
    删掉对应注册表里的 Extended 就行了。PowerShell 、WSL 都一样。
    3dwelcome
    3dwelcome
    Apr 14, 2021
    11
    我的注册表,参考一下:
    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
    @="Open command window here"
    "Extended"=""
    "NoWorkingDirectory"=""

    [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command]
    @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""


    话说你都能上 V2 正常发帖,用什么百度哦。
    ClericPy
    ClericPy
    Apr 14, 2021
    12
    我也是手动在注册表里加的, 虽然加的是 cmder...
    azur
    azur
    Apr 14, 2021
    13
    Windows Terminal
    LeeReamond
    LeeReamond
    OP
    Apr 15, 2021
    14
    @3dwelcome 照着新建了个一样的,不好使,win10 20H2
    3dwelcome
    3dwelcome
    Apr 15, 2021
    15
    @LeeReamond 我 win10 的版本比较老,可能和楼上回复综合一下,删掉"Extended"=""那句?
    LeeReamond
    LeeReamond
    OP
    Apr 15, 2021
    16
    @LeeReamond 删除 extended 和 noworkingdirectory 后可以在右键菜单发现,但打开时提示

    [Window Title]Explorer.EXE

    [Content]
    该文件没有与之关联的应用来执行该操作。请安装应用,若已经安装应用,请在“默认应用设置”页面中创建关联。

    [确定]
    LeeReamond
    LeeReamond
    OP
    Apr 15, 2021
    17
    @3dwelcome 感谢,解决了,后面的提示错误是命令错误导致的,不是注册表结构问题。注册表最后保留了 noworkingdirectory,删除了 extended
    PqgpNgA0wk
    PqgpNgA0wk
    Apr 15, 2021
    18
    要不在资源管理器地址栏输 powershell 或 wt 🤣
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3792 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 130ms · UTC 09:50 · PVG 17:50 · LAX 01:50 · JFK 04:50
    ♥ Do have faith in what you're doing.