V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
LeeReamond
V2EX  ›  问与答

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

  •  
  •   LeeReamond · 2021-04-14 17:27:03 +08:00 · 1279 次点击
    这是一个创建于 1100 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

    18 条回复    2021-04-15 16:34:21 +08:00
    Juicpt
        1
    Juicpt  
       2021-04-14 17:30:43 +08:00
    装一个 Windows Terminal ?
    Juicpt
        2
    Juicpt  
       2021-04-14 17:31:55 +08:00
    SuperMild
        3
    SuperMild  
       2021-04-14 17:50:01 +08:00
    装 Windows Terminal 吧,启动速度也是很快。
    Lunatic1
        4
    Lunatic1  
       2021-04-14 17:50:28 +08:00
    确实,按住 shift 确实麻烦
    Jirajine
        5
    Jirajine  
       2021-04-14 18:11:08 +08:00 via Android
    PowerShell 启动速度很糟糕,你觉得比其他的快是因为其他的那些不是 win 原生的程序。
    elvish 、nushell 等原生跨平台的 shell 启动都比 pwsh 快。
    ysc3839
        6
    ysc3839  
       2021-04-14 18:49:59 +08:00 via Android   ❤️ 1
    去注册表 HKEY_CLASSES_ROOT\Directory\Background\shell 下面看看吧,我现在没用电脑,不知道具体是哪个。
    LeeReamond
        7
    LeeReamond  
    OP
       2021-04-14 19:11:56 +08:00
    @Juicpt terminal 启动还是慢的,虽然确实挺好用的
    creanme
        8
    creanme  
       2021-04-14 19:46:26 +08:00
    HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell 删掉 Extended
    limuyan44
        9
    limuyan44  
       2021-04-14 19:59:51 +08:00
    google 第一条
    open powershell without shift key
    abersheeran
        10
    abersheeran  
       2021-04-14 20:30:47 +08:00
    删掉对应注册表里的 Extended 就行了。PowerShell 、WSL 都一样。
    3dwelcome
        11
    3dwelcome  
       2021-04-14 20:36:06 +08:00
    我的注册表,参考一下:
    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
        12
    ClericPy  
       2021-04-14 20:37:05 +08:00
    我也是手动在注册表里加的, 虽然加的是 cmder...
    azur
        13
    azur  
       2021-04-14 22:22:17 +08:00
    Windows Terminal
    LeeReamond
        14
    LeeReamond  
    OP
       2021-04-15 00:21:58 +08:00
    @3dwelcome 照着新建了个一样的,不好使,win10 20H2
    3dwelcome
        15
    3dwelcome  
       2021-04-15 00:34:05 +08:00
    @LeeReamond 我 win10 的版本比较老,可能和楼上回复综合一下,删掉"Extended"=""那句?
    LeeReamond
        16
    LeeReamond  
    OP
       2021-04-15 00:35:37 +08:00
    @LeeReamond 删除 extended 和 noworkingdirectory 后可以在右键菜单发现,但打开时提示

    [Window Title]Explorer.EXE

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

    [确定]
    LeeReamond
        17
    LeeReamond  
    OP
       2021-04-15 00:37:31 +08:00
    @3dwelcome 感谢,解决了,后面的提示错误是命令错误导致的,不是注册表结构问题。注册表最后保留了 noworkingdirectory,删除了 extended
    PqgpNgA0wk
        18
    PqgpNgA0wk  
       2021-04-15 16:34:21 +08:00
    要不在资源管理器地址栏输 powershell 或 wt 🤣
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1386 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 17:27 · PVG 01:27 · LAX 10:27 · JFK 13:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.