---
title: "win10 右键打开命令行"
author: "canlynet"
date: "2019-05-02T07:44:58Z"
tags: []
categories: ["操作系统"]
slug: "win10"
draft: false
lastmod: "2019-05-02T07:44:58Z"
id: 2440600
url: "https://canlynet.iteye.com/blog/2440600"
---

网上到处寻找win10右键打开命令行的设置方法，发现1个最简单和实用的，我记录下来：

Windows Registry Editor Version 5.00

\[HKEY\_CLASSES\_ROOT\\Directory\\shell\\OpenCmdHere]  
@="在此处打开命令窗口"  
"Icon"="cmd.exe"

\[HKEY\_CLASSES\_ROOT\\Directory\\shell\\OpenCmdHere\\command]  
@="cmd.exe /s /k pushd "%V""

\[HKEY\_CLASSES\_ROOT\\Directory\\Background\\shell\\OpenCmdHere]  
@="在此处打开命令窗口"  
"Icon"="cmd.exe"

\[HKEY\_CLASSES\_ROOT\\Directory\\Background\\shell\\OpenCmdHere\\command]  
@="cmd.exe /s /k pushd \\"%V\\""

\[HKEY\_CLASSES\_ROOT\\Drive\\shell\\OpenCmdHere]  
@="在此处打开命令窗口"  
"Icon"="cmd.exe"

\[HKEY\_CLASSES\_ROOT\\Drive\\shell\\OpenCmdHere\\command]  
@="cmd.exe /s /k pushd \\"%V\\""

\[HKEY\_CLASSES\_ROOT\\LibraryFolder\\background\\shell\\OpenCmdHere]  
@="在此处打开命令窗口"  
"Icon"="cmd.exe"

\[HKEY\_CLASSES\_ROOT\\LibraryFolder\\background\\shell\\OpenCmdHere\\command]  
@="cmd.exe /s /k pushd \\"%V\\""

 

原网址：[https://blog.csdn.net/mooneve/article/details/78821843](https://blog.csdn.net/mooneve/article/details/78821843) 新版的。