В Windows 10 версии 1703 пункт «Командная строка» в контекстном меню «Пуск» изменился на PowerShell, а пункт контекстного меню проводника (который появляется, если удерживать Shift при нажатии правой кнопки мыши) «Открыть окно команд» — на «Открыть окно PowerShell здесь». И если первое легко меняется в Параметры — Персонализация — Панель задач (пункт «Заменить командную строку оболочкой Windows PowerShell»), то второе при изменении данной настройки не изменяется.
В этой инструкции — пошагово о том, как вернуть пункт «Открыть окно команд» Windows 10, вызываемое в Проводнике при вызове контекстного меню с удерживанием клавиши Shift и служащий для запуска командной строки в текущей папке (если вызывать меню в пустом месте окна проводника) или в выбранной папке. См. также: Как вернуть панель управления в контекстное меню Пуск Windows 10.
Возвращаем пункт «Открыть окно команд» с помощью редактора реестра
Для того, чтобы вернуть указанный пункт контекстного меню в Windows 10, проделайте следующие действия:
- Нажмите клавиши Win+R и введите regedit для запуска редактора реестра.
- Перейдите к разделу реестра HKEY_CLASSES_ROOT\Directory\shell\cmd, нажмите правой кнопкой мыши по имени раздела и выберите пункт меню «Разрешения».
- В следующем окне нажмите кнопку «Дополнительно».
- Нажмите «Изменить» рядом с пунктом «Владелец».
- В поле «Введите имена выбираемых объектов» введите имя вашего пользователя и нажмите «Проверить имена», а затем — «Ок». Примечание: если используется учетная запись Майкрософт, введите адрес электронной почты вместо имени пользователя.
- Отметьте пункт «Заменить владельца подконтейнеров и объектов» и «Заменить все записи разрешений дочернего объекта», затем нажмите «Ок» и подтвердите действие.
- Вы вернетесь в окно параметров безопасности раздела реестра, в нем выберите пункт «Администраторы» и установите отметку «Полный доступ», нажмите «Ок».
- Вернувшись в редактор реестра, нажмите по значению HideBasedOnVelocityId (в правой части редактора реестра) правой кнопкой мыши и выберите пункт «Удалить».
- Повторите шаги 2-8 для разделов HKEY_CLASSES_ROOT\Directory\Background shell\cmd и HKEY_CLASSES_ROOT\Drive\shell\cmd
По завершении указанных действий, пункт «Открыть окно команд» вернется в том виде, в котором ранее присутствовал в контекстном меню проводника (даже без перезапуска explorer.exe или перезагрузки компьютера).
Дополнительная информация
- Существует дополнительная возможность открыть командную строку в текущей папке в проводнике Windows 10: находясь в нужной папке, введите в адресную строку проводника cmd и нажмите Enter.
Окно команд можно открывать и на рабочем столе: Shift + правый клик мышью — выбор соответствующего пункта меню.
Еще в ранних версиях Windows 10 можно было, зажав клавишу [Shift], кликать правой кнопкой по папке в проводнике и вызывать командную строку, но более поздние версии Windows 10 позволяют открывать только PowerShell. Чтобы вернуть окно команд в контекстное меню, нужно изменить реестр.
Нажмите [Win] + [R] и введите «regedit» без кавычек. Откройте путь «HKEY_CLASSES_ROOT\Directory\shell\cmd», правой кнопкой щелкните «cmd» и выберите «Разрешения». В следующем окне щелкните «Администраторы» и установите внизу в поле «Полный доступ» флажок «Разрешить». Щелкните «Применить» и затем «OK».
Если выскочило уведомление, что не удалось сохранить изменения из-за отказа в доступе, необходимо использовать немного другой путь. Снова нажмите правой кнопкой на «cmd» и выберите «Разрешения».
В открывшемся окне выберите «Дополнительно» и далее «Изменить» вверху. Введите свое точное имя пользователя в поле для ввода и нажмите «Проверить имена».
Если имя подтверждено, то Windows скорректирует ввод. Нажмите «OK» и вернитесь в окно, где можно разрешить полный доступ. Но теперь выберите строку «Пользователи» и активируйте полный доступ, нажав «Применить» и подтвердив «OK». Подсказка: точное имя пользователя вы найдете в папке «C:\Пользователи».
Вернитесь в редактор реестра. В правом поле есть параметр «HideBasedOnVelocityId». Щелкните по нему правой кнопкой, выберите «Переименовать» и добавьте в начало имени, например, дефис.
Закройте редактор реестра. Теперь в контекстном меню любой папки при зажатой клавише [Shift] снова появится строка «Открыть окно команд».
Читайте также:
- Как Windows 10 взломать реестр и удалить OneDrive из Проводника
- Как создать резервную копию реестра Windows
Фото: компании-производители
Starting with Windows 10 build 14986, Microsoft enabled PowerShell by default in the context menu in File Explorer. The good old command «Open command window here» was removed. You can get the command prompt back in the context menu of File Explorer in Windows 10 Creators Update with a simple Registry tweak.
Earlier, Microsoft has removed the command prompt entries from the Win + X menu in Windows 10 Creators Update. See Add Command Prompt back to Win+X Menu in Windows 10 Creators Update.
It is not clear what Microsoft’s plan is regarding cmd.exe’s future. Quite possible the Redmond giant is going to merge the cmd.exe functionality with PowerShell and leave its executable file just for compatibility reasons. Let’s see how add Command Prompt back to the context menu in Windows 10 Creators Update.
Add Command Prompt to Context Menu in Windows 10 Creators Update
Method 1. Modify the a DWORD value for the existing key
Do the following.
- Open Registry Editor.
- Go to the following Registry key:
HKEY_CLASSES_ROOT\Directory\shell\cmd
Tip: How to jump to the desired registry key with one click.
- Take ownership of this key to modify its permissions.
- Add «Full control» to permissions of Administrators:
- Rename the DWORD value HideBasedOnVelocityId as shown below:
- The command prompt context menu item will re-appear in the context menu:
- Now, repeat steps above under the following key:
HKEY_CLASSES_ROOT\Drive\shell\cmd
I tested this tweak in Windows 10 build 14986 and it worked as expected. If it doesn’t work for you, see Method 2.
Method 2. Re-create the context menu entry
Save the following Registry tweak as a *.REG file and double click it to apply. It replicates the default command prompt context menu entry.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Drive\shell\cmd2] @="Open command window here" "Extended"="" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOT\Drive\shell\cmd2\command] @="cmd.exe /s /k pushd \"%V\"" [HKEY_CLASSES_ROOT\Directory\shell\cmd2] @="Open command window here" "Extended"="" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOT\Directory\shell\cmd2\command] @="cmd.exe /s /k pushd \"%V\"" [HKEY_CLASSES_ROOT\Directory\Background\shell\cmd2] @="Open command window here" "Extended"="" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOT\Directory\Background\shell\cmd2\command] @="cmd.exe /s /k pushd \"%V\""
You can replace the portion «Open command window here» with any text you want.
You can remove the «Extended» line from the tweak to make the context menu command always visible. It won’t require to hold the Shift key to access the command.
To save your time, I made ready-to-use Registry files. One of them contains the tweak above, the other one is the undo file.
Download Registry Files
Finally, you can use Winaero Tweaker. Go to Context menu — Add Command Prompt to Context Menu and tick the option. You can name the context menu item as you wish and make it visible only in the extended context menu.
You can get Winaero Tweaker here: Download Winaero Tweaker.
That’s it.
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won’t take a lot from you, but it will help us grow. Thanks for your support!
When you open the command prompt by going to Run –> cmd, you will notice that by default, it opens in the user profile directory path. Sometimes, the user needs to open the command windows with the currently opened folder path. This article explains the exact scenario.
Command Prompt is the command-line which enables users to execute different programs and commands. Microsoft is slowly removing command prompt support from all its major Windows platforms. PowerShell is the alternative to Command Prompt which supports almost all the commands of DOS and much more. Some users still insist on using Command Prompt instead of PowerShell.
If the program you want to run in Command Prompt is not listed in the PATH variable, the Command Prompt will give you an error that it could not find the executable file. For this, we need to manually go to the folder where that particular program is located. One way of doing this is to type in the complete path of the file. Another way is to directly open the command prompt windows inside the folder. The second approach is more visual and easy to implement.
Pro Tip: If you are using Windows 10, just open the folder and go to File menu –> Open Windows PowerShell. You also have the option to open Windows PowerShell as Administrator.
Table of Contents
In this article, we will discuss different techniques by which we can open command windows in a folder, the most popular being “Open Command Windows Here” context menu item. Let’s start.
Add Open Command Window Here to the context menu using Registry Editor
- Click Windows + R then type regedit. This will open Windows Registry editor.
- Registry editor window will open. After that go to HKEY_CLASSES_ROOT. Further go into Directory\shell\cmd
- and right click Permissions. The following window will appear.
- Then click on the Advanced option.
- After that, click on change at the top of the window
- Type your username in “Enter the object name to select” and then click on the check name to validate that name.
- Press Apply and then OK. When you are done with those Administrative modes in Group or user names of permissions for cmd window and tick Allow on Full control. Click Apply and then OK
- Once you are done with it, click on HideBasedonVelocityID and rename it ShowBasedonVelocityId
- Now when you click the Shift key and right click you will see the option “Open Command Window here“
This will permanently add “Open Command Window here” to the Windows Context menu. After editing the Registry, you will be able to open the command prompt by right clicking inside any folder and selecting “Open Command Window Here”.
Add Open Command Window Here using the REG file
This is basically the same method listed above. For your ease, we have created a REG file for all the actions mentioned above. You just have to download and run the REG file. It will automatically add the desired values inside the Windows Registry.
Add Open Command Window Here to Context Menu.reg (304 bytes, 20,545 hits)
If the value does not come after running this file, please try restarting Windows Explorer or the computer.
Open Command Prompt In A Folder Using Keyboard Shortcut?
If you are in a hurry then this is the easiest method of opening Command Prompt inside the folder. Just follow the steps below:
- Go to the required folder.
- The press Shift + right click mouse button anywhere in the folder window.
- Select the “Open command window here” option from the context menu.
Using CMD command in File Explorer to open Command Prompt Window
You can open a command prompt in any of your desired folder by using the file explorer location bar.
- Go to your desired folder and click on the location bar of Windows Explorer.
- Then type cmd and press Enter key.
- The command prompt will be opened in the folder.
One drawback of this technique is that it will open the command prompt in the regular user privilege mode and not in the administrative mode. To open it in administrative mode:
Select Windows + R and type cmd.
Click Ctrl+Shift+Enter instead of just hitting enter to open the Command Prompt in administrative mode.
You can also open PowerShell window using the same technique. Just go to the folder and then type powershell in the File Explorer address bar. This will open PowerShell in the same folder location or path.
Add “Open Command Window Here” with Administrative privileges in the context menu
In order to “open Command Window here ” with administrative privileges you can download the following file.
Open Command Window Here (Administrator) to context menu.reg (215 bytes, 12,445 hits)
This will add a context menu option for the admin command prompt.
How to get back Command Prompt in Win+X menu?
In order to change the Windows Powershell options with Command Prompt go to Settings –> Personalization –> Taskbar. After that turn off the option of “Replace Command Prompt with Windows Powershell Option in the menu when i right click the start button or press Windows key +X”.
The Command Prompt still remains an important part of Windows Operating System and using the methods discussed above, you will be able to make productive use of your time by using shortcuts. What is your favorite method of running command prompt without typing in the folder paths?
On Windows 10, Microsoft continues to fade out Command Prompt in favor of PowerShell. Although you can still use the console, you’ll notice that the option is no longer available on the Power User menu (Windows key + X), on the File menu for File Explorer, or in the extended context menu (Shift + Right-click).
While there is an option in the Settings app to add Command Prompt to the Power User menu, you won’t find an option to bring it back to the extended context menu. However, it’s still possible to re-incorporate the option in Windows 10, if you’re comfortable modifying the Registry.
In this Windows 10 guide, we walk you through the steps to bring back the «Open command window here» option to the context menu.
How to add ‘Open command window here’ to the context menu
Adding the «Open command window here» to the extended-folder context menu is a two-step process. First, you need to bring back the option when you open the menu when right-clicking a folder, and second, using similar steps, you need to return the option when right-clicking the background of a folder.
Adding ‘Open command window here’ to the folder context menu
In order to re-incorporate the option to launch Command Prompt on the extended context menu, you’ll need to modify the Registry using the following steps:
Warning: This is a friendly reminder that editing the registry is risky, and it can cause irreversible damage to your installation if you don’t do it correctly. We recommend making a full backup of your PC before proceeding.
If you’re ready, follow these steps:
All the latest news, reviews, and guides for Windows and Xbox diehards.
- Use the Windows key + R keyboard shortcut to open the Run command.
- Type regedit, and click OK to open the Registry.
- Browse the following path:
HKEY_CLASSES_ROOT\Directory\shell\cmd
- Right-click the cmd (folder) key, and click Permissions.
- Click the Advanced button.
- On «Advanced Security Settings,» click the Change link next to «Owner.»
- Type your account name in the provided field, click Check Names to verify you’re typing the account name correctly, and click OK.
- Check the Replace owner on subcontainers and objects option.
- Click Apply.
- Click OK.
- On «Permissions,» select the Administrators group.
- Under «Permissions for Administrators,» select Allow for the Full Control option.
- Click Apply.
- Click OK.
- Inside the cmd (folder) key, right-click the HideBasedOnVelocityId DWORD, and click Rename.
- Change the DWORD name from HideBasedOnVelocityId to ShowBasedOnVelocityId, and press Enter.
Once you complete these steps, using the Shift + Right-click combo on a folder will display the «Open command window here» option.
At any time, you can revert the changes following the same instructions, but on step No. 16, make sure to rename the DWORD from from ShowBasedOnVelocityId to HideBasedOnVelocityId, and press Enter.
Adding ‘Open command window here’ to the background context menu
The instructions mentioned above add the option to open Command Prompt on the folder context menu, but not when you Shift + right-click the background of the folder that is currently open.
If you want to Shift + right-click a background to open the location using Command Prompt, you need to follow these extra steps:
- Use the Windows key + R keyboard shortcut to open the Run command.
- Type regedit, and click OK to open the Registry.
- Browse the following path:
HKEY_CLASSES_ROOT\Directory\Background\shell\cmd
- Right-click the cmd (folder) key, and click Permissions.
- Click the Advanced button.
- On «Advanced Security Settings,» click the Change link next to «Owner.»
- Type your account name in the provided field, click Check Names to verify you’re typing the account name correctly, and click OK.
- Check the Replace owner on subcontainers and objects option.
- Click Apply.
- Click OK.
- On «Permissions,» select the Administrators group.
- Under «Permissions for Administrators,» select Allow for the Full Control option.
- Click Apply.
- Click OK.
- Inside the cmd (folder) key, right-click the HideBasedOnVelocityId DWORD, and click Rename.
- Change the DWORD name from HideBasedOnVelocityId to ShowBasedOnVelocityId, and press Enter.
Once you complete these steps, when using the Shift + right-click combo on a folder background you will see the «Open command window here» option.
You can revert the changes following the same instructions, but on step No. 16, make sure to rename the DWORD from from ShowBasedOnVelocityId to HideBasedOnVelocityId, and press Enter.
Thanks @johannesmp (Windows Central reader) for this part of the tip!
You’ll also notice that using the above steps will bring back the «Open command window here,» but it’ll keep the «Open PowerShell window here» too.
If you want to remove the PowerShell entry from the extended context menu, do the following:
- Use the Windows key + R keyboard shortcut to open the Run command.
- Type regedit, and click OK to open the Registry.
- Browse the following path:
HKEY_CLASSES_ROOT\Directory\shell\PowerShell
- Right-click the PowerShell (folder) key, and click Permissions.
- Click the Advanced button.
- On «Advanced Security Settings,» click the Change link next to «Owner».
- Type your account name in the provided field, click Check Names to verify you’re typing the account name correctly, and click OK.
- Check the Replace owner on subcontainers and objects option.
- Click Apply.
- Click OK.
- On «Permissions,» select the Administrators group.
- Under «Permissions for Administrators,» select Allow for the Full Control option.
- Click Apply.
- Click OK.
- Inside the PowerShell (folder) key, right-click the ShowBasedOnVelocityId DWORD, and click Rename.
- Change the DWORD name from ShowBasedOnVelocityId to HideBasedOnVelocityId, and press Enter.
After completing these steps, using Shift + Right-click will only show the «Open command window here» option.
To bring back the PowerShell option, follow the same instructions, but on step No. 16, make sure to rename the DWORD from HideBasedOnVelocityId to ShowBasedOnVelocityId, and press Enter.
Wrapping things up
While you can run the majority of the commands using PowerShell, a lot of people still prefer Command Prompt, and the context menu option provides a quick way to open the utility in a specific location without having to type a long command to navigate to a folder path. But now, thanks to a hidden option in the Registry, you can bring that experience back to Windows 10.
More Windows 10 resources
For more help articles, coverage, and answers to common questions about Windows 10, visit the following resources:
- Windows 10 on Windows Central – All you need to know
- Windows 10 help, tips, and tricks
- Windows 10 forums on Windows Central
Mauro Huculak has been a Windows How-To Expert contributor for WindowsCentral.com for nearly a decade and has over 15 years of experience writing comprehensive guides. He also has an IT background and has achieved different professional certifications from Microsoft, Cisco, VMware, and CompTIA. He has been recognized as a Microsoft MVP for many years.