Since the default right key of Win10 is only Powershell now, for the convenience of future use, I will share the code of adding "Open command window here" to the right key. (#^.^#)
Effect
The first is to right-click directly on the desktop/folder window/selected folder to display the "Open command window here" option, as shown in the figure:
The second is in the desktop/folder window/selected folder Hold down the Shift key and right-click, and two options, "Open Command Window Here" and "Open Powershell Window Here" are displayed at the same time, as shown in the figure:
Specific steps
Step 1: Create a new txt file and name it OpenCmdHere.txt
Step 2: Enter the following code in the file and save it
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere] @="Open command prompt here" "Icon"="cmd.exe" [HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere\command] @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\"" [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere] @="Open command window here" "Icon"="cmd.exe" [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command] @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\"" [HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere] @="Open command window here" "Icon"="cmd.exe" [HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere\command] @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\"" [HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere] @="Open command window here" "Icon"="cmd.exe" [HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere\command] @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""
Step 3: Change the file suffix to reg, and the pop-up prompt is clicked to confirm.
Step 4: Double-click the OpenCmdHere.reg file to run, the pop-up prompt point to confirm, modify the registry and you're done!