win+r | 输入regedit命令打开注册表。

定位到该路径:

计算机\HKEY_CLAssEs_RooT\directory\Background\shell\powershell\command

右键 | 修改,输入:

cmd.exe /s /k pushd "%V" 

cmd和powershell的设置值

### cmd用这个
cmd.exe /s /k pushd "%V" 
### powershell用这个
powershell.exe -noexit -command set-Location -literalpath '%V'

注:这里为什么会是powershell呢,因为默认右键是有powershell的,这里把powershell的地址改为cmd了,也就是右键虽然显示打开的是powershell,实际打开的是cmd。