2025年3月30日 星期日 甲辰(龙)年 月廿九 夜 设为首页 加入收藏
rss
您当前的位置:首页 > 计算机 > 系统应用 > Windows

Win10添加右键打开cmd

时间:08-02来源:作者:点击数:21

0x01 概述

Windows10 升级以后,把默认的右键打开cmd修改为了powershell,本文将提供方法修改回cmd

0x02 操作方法

效果如下:

右键:

  • 在此处打开命令行窗口
  • 在此处打开命令行窗口(管理员)

shift + 右键:

  • 在此处打开 Powershell 窗口
  • 在此处打开 Powershell 窗口(管理员)

将下面的代码复制一下,保存为 powershelltocmd.reg 然后双击导入即可。

  • Windows Registry Editor Version 5.00
  • ; 若原先有,先删除原来的
  • [-HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
  • [-HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
  • [-HKEY_CLASSES_ROOT\Directory\Background\shell\PowershellAdmin]
  • ; 1.右键:命令行
  • [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
  • @="在此处打开命令行窗口"
  • [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command]
  • @="cmd.exe -noexit -command Set-Location -literalPath \"%V\""
  • ; 2.右键:命令行(管理员)
  • [HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
  • @="在此处打开命令行窗口(管理员)"
  • "ShowBasedOnVelocityId"=dword:00639bc8
  • [HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
  • @="cmd.exe /s /k pushd \"%V\""
  • ; 3.shift+右键:Powershell(管理员)
  • [HKEY_CLASSES_ROOT\Directory\Background\shell\PowershellAdmin]
  • @="在此处打开 Powershell 窗口(管理员)"
  • "Extended"=""
  • [HKEY_CLASSES_ROOT\Directory\Background\shell\PowershellAdmin\command]
  • @="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -windowstyle hidden -Command $stpath = pwd; Start-Process PowerShell -ArgumentList \\\"-NoExit\\\", \\\"-Command Set-Location -literalPath '%V'\\\" -verb RunAs"
方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门
本栏推荐