Comments
yanglr
added
the
Issue-Feature
Complex enough to require an in depth planning process and actual budgeted, scheduled work.
label
May 30, 2019
msftbot
bot
added
Needs-Triage
It’s a new issue that the core contributor team needs to triage at the next triage meeting
Needs-Tag-Fix
Doesn’t match tag requirements
labels
May 30, 2019
yanglr
changed the title
Is there a method to add «open Windows terminal here» to right-click context menu?
Is there a method to add «open Windows terminal here» into right-click context menu?
May 30, 2019
DHowett-MSFT
changed the title
Is there a method to add «open Windows terminal here» into right-click context menu?
Add «open Windows terminal here» into right-click context menu
May 30, 2019
DHowett-MSFT
removed
the
Needs-Triage
It’s a new issue that the core contributor team needs to triage at the next triage meeting
label
May 30, 2019
msftbot bot
pushed a commit
that referenced
this issue
May 28, 2020
jelster
pushed a commit
to jelster/terminal
that referenced
this issue
May 28, 2020
microsoft
locked as resolved and limited conversation to collaborators
Jun 18, 2020
Alongside PowerShell, you can also add Windows Terminal to right-click menu. Follow these steps to add ‘Open Windows Terminal Here’ option.
Windows Terminal is what the users have been asking for years. A new terminal application that is fully customizable all the while being powerful and flexible. Thanks to the new tabbed interface, you can open multiple consoles of different types at the same time and work with them as needed. In fact, I’ve been using it as my main console ever since it was released.
When working with directories, it is very useful to open the terminal in that specific directory. This eliminates the need to manually open the terminal and then navigate to that folder using multiple cd commands. Unfortunately, as of writing this, Windows Terminal has no such option. You are stuck with the old “Open PowerShell window here” option. Thankfully, you can add your own “Open Windows Terminal Here” option to the right-click menu in just a few steps.
Without ado, follow the below steps to add an open Windows Terminal here option to the right-click context menu in Windows 10.
1. First, we need to set the default directory in Windows Terminal. To do that, open Windows Terminal, click on the drop-down button on the title bar and select “Settings“. In the JSON file, add the below line to your default profile.
"startingDirectory": "."
If you are curious, we are adding this line because without it, when you open Windows Terminal from the right-click menu, it will open in your home directory rather than in the current directory.
2. Now, right-click on the desktop and select “New → Text Document” to create a new text file. Name the text file as “wt.reg“. This action converts the text file into the reg file.
3. Next, right-click on the newly created file and select “Edit“.
4. The above action will open the file in the default text editor. Here, copy and paste the below code in it. Don’t forget to replace “<Username>” with your actual Windows username. Save the file by pressing Ctrl + S or selecting “File → Save“.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOTDirectoryBackgroundshellwt] @="Open Windows Terminal here" [HKEY_CLASSES_ROOTDirectoryBackgroundshellwtcommand] @="C:\Users\<UserName>\AppData\Local\Microsoft\WindowsApps\wt.exe"
5. Now, close the file and double-click on it. You will be prompted whether you want to merge the reg file. Click on the “Yes” button and then the “Ok” button.
That is it. From now on, whenever you Shift + Right-click in a directory or folder, you will see the new “Open Windows Terminal here” option in the right-click menu.
Selecting the option will open Windows Terminal in that directory.
(Optional) Add Icon to the Option
If you are willing to go the extra mile, you can add a little icon right before the option in the right-click menu. This is just eye candy and you can ignore it if you are not interested.
1. Download this official Windows Terminal icon.
2. After downloading, open the Run dialog box by pressing Win + R shortcut. In the blank field, copy and paste the below path and press Enter.
%USERPROFILE%/AppData/Local/
3. In this folder, right-click and select “New → Folder” to create a new folder. Name the folder as “WTerminal“.
4. Now, copy the icon to the newly created folder.
5. Next, open the “Registry Editor” by searching for it in the start menu. In the Registry Editor, go to the following folder.
HKEY_CLASSES_ROOTDirectoryBackgroundshellwt
6. Right-click on the right-panel and select the “New → String Value” option. Name the value as “Icon“.
7. Double-click on the “Icon” value. In the value data field, copy and paste the below path and click on the “Ok” button.
%USERPROFILE%/AppData/Local/WTerminal/terminal.ico
That is it. Close the registry editor. From now on, you should also see the terminal icon right next to the “Open Windows Terminal here” option.
I hope that helps. If you are stuck or need some help, comment below and I will try to help as much as possible.
Download PC Repair Tool to quickly find & fix Windows errors automatically
Almost a couple of years before Microsoft announced the release of several tools, services, APIs for computer geeks like us who like to tweak everything we lay our hands on. One of those things was Windows Terminal which wasn’t available for everyone then but is available now. We have seen how to change the Default Shell, now let us in this article, we will learn how to add or remove the option of “Open in Windows Terminal” to and from the context menu in Windows.
For a good amount of time, we have been exposed to either using Command Prompt or Windows PowerShell; the Windows Terminal allows us to continue to experience the fun of both in a single environment with more additional features. Once you install the Windows Terminal, it will automatically start showing the option of Open in Windows Terminal. Sometimes it does happen that you will not find the option in the context menu and there can be multiple reasons behind it.
Related: How to open Windows Terminal as administrator in Windows 11.
Now to be able to add or remove the option from the context menu, we need to perform certain changes in the Windows Registry, which can be very tricky at times. One wrong step and your system will start behaving abnormally or won’t start at all. To avoid such problems, the methods mentioned below use registry files that can be added directly to the list of system registries.
Download this registry file from our server and unzip it. Before we begin, create a system restore point and then follow the steps given below. Make sure that the Windows Terminal is already installed or install it from the Windows Store.
The files contain the following codes:
Add:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionShell ExtensionsBlocked] "{9F156763-7844-4DC4-B2B1-901F640F5155}"=-
Remove:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionShell ExtensionsBlocked] "{9F156763-7844-4DC4-B2B1-901F640F5155}"=""
To add the option of Open in Windows Terminal in the context menu, navigate to the unzipped folder of registry files.
Double click on the Add_Open_in_Windows_Terminal.reg registry file.
Once you get a UAC prompt, click on Yes.
On the registry addition prompt, click on Ok.
Before you check if the option is available in the context menu or not, save all the work and restart your system. Now navigate to any folder or location, right-click on a file or blank space the option of Open in Windows Terminal will be present.
Read: Windows Terminal Tips and Tricks.
Remove “Open in Windows Terminal” from the context menu
To remove the option of Open in Windows Terminal in the context menu, navigate to the unzipped folder of registry files.
Double click on the Remove_Open_in_Windows_Terminal.reg registry file.
Once you get a UAC prompt, click on Yes.
On the registry addition prompt, click on Ok.
Again restart your system for the option to be removed from the context menu.
Remove Open in Windows Terminal Context Menu item by manually editing the Registry
Open the Registry Editor
Navigate the following Registry key-
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionShell ExtensionsBlocked
On the right side, modify or create a new string (REG_SZ) value and give it the following value:
{9F156763-7844-4DC4-B2B1-901F640F5155}
Leave its Value data empty
Restart your computer.
To undo the changes or add the item back, simply delete the created string value:
{9F156763-7844-4DC4-B2B1-901F640F5155}
You can also:
- Add Open Windows Terminal as administrator to Context Menu
- Add Open Windows Terminal in Default, Command Prompt, PowerShell profile context menu items.
TIP: If you wish, you can also reset Windows Terminal settings to default.
Shubham is a PHP Developer, who is skilled in PHP, DOM, Angular, JavaScript, and C#. He loves talking about Microsoft technologies.
You can add Open in Windows Terminal as Administrator to Context menu in Windows 10 File Explorer, so this entry will allow you to open the app elevated from the right-click menu in the current folder.
When you have Windows Terminal installed, it add the Open in Windows Terminal entry to the right-click menu of folders in File Explorer. In addition, you can add a new administrative menu command, so you can have the app open in the folder of your choice running elevated.
Windows Terminal is a modern terminal software for command-line users that has plenty of features you won’t find in the classic Command Prompt and PowerShell tools. It comes with tabs, a GPU accelerated DirectWrite/DirectX-based text rendering engine, profiles, and more.
Thanks to profiles, you can have instances of Command Prompt, PowerShell, and Windows Subsystem for Linux running in tabs. Another great thing about the app is that it is fully open-sourced, so anyone can contribute. It is available on GitHub.
When installed, Windows Terminal adds a context menu command, Open in Windows Terminal, to the right-click of File Explorer. You can further enhance this feature by adding an extra command that opens the app with high privileges.
This post will show you how to add Open Windows Terminal as Administrator to context menu in Windows 10 File Explorer.
- Download the following ZIP archive: Download ZIP archive.
- Extract its contents to any folder. You can place the files directly to the Desktop.
- Double click on the Add Open in Windows Terminal as administrator.reg file to merge it.
- To later remove the entry from the context menu, use the provided file Remove Open in Windows Terminal as administrator.reg.
You are done!
The Open in Windows Terminal as administrator right-click menu includes three options that you can use to open an elevated Windows Terminal in the current folder.
You will be able to choose the default profile, or one of the predefined extra profiles, Command Prompt and PowerShell. You can customize the downloaded REG files and add more profiles of your choice, e.g. WSL or any other custom profile.
How it works
The context menu entries use PowerShell to launch a new process with high privileges. The important command line arguments here are -WindowStyle Hidden
which hides the PowerShell window, and Start-Process -Verb RunAs
, which starts a process elevated.
The PowerShell process starts the following commands elevated for the respective right-click menu entries:
-
wt.exe -d folderpath
to launch the Windows Terminal with the default profile in the current folder from File Explorer. -
wt.exe -p "Command Prompt" -d folderpath
— to open Windows Terminal using the default «Command Prompt» profile. -
wt.exe -p "Windows PowerShell" -d folderpath
— to open the default Windows PowerShell profile in Windows Terminal to the current folder location.
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!
In this post I would like to show you how to add an Open Terminal here
entry to Right-Click menu in Windows.
First, download the new Windows Terminal. It is awesome!
Also, you can get a script to run all the commands for you here: https://github.com/zeroby0/open-terminal-here
Download the Windows Terminal icon
Open a new Terminal window and type these commands to download a high resolution icon to show in the menu.
$ICON_URL = "https://raw.githubusercontent.com/zeroby0/open-terminal-here/master/wt.ico"
$ICON_PATH = "$env:LOCALAPPDATAwt_terminal"
$WT_PATH = "$env:LOCALAPPDATAMicrosoftWindowsAppswt.exe"
# Download icon
New-Item -ItemType "directory" -Path "$ICON_PATH"
Invoke-WebRequest "$ICON_URL" -OutFile "$ICON_PATHwt.ico"
Enter fullscreen mode
Exit fullscreen mode
Registry keys for folders
Now let’s add some registry entries. You can now click on a folder and open terminal there.
# Add entry on folders
$REG_PATH = "HKCU:SoftwareClassesDirectoryshellwt_terminal"
New-Item -Path $REG_PATH -Value "Open in Terminal" -Force
New-Item -Path "$REG_PATHcommand" -Value "$WT_PATH -d `"%V%`"" -Force
New-ItemProperty -Path $REG_PATH -Name "Icon" -Value "$ICON_PATHwt.ico"
Enter fullscreen mode
Exit fullscreen mode
Registry keys inside folders
To open Terminal inside a folder by clicking on the Explorer background, run the following commands.
# Add entry inside folders
$REG_PATH = "HKCU:SoftwareClassesDirectoryBackgroundshellwt_terminal"
New-Item -Path $REG_PATH -Value "Open Terminal here" -Force
New-Item -Path "$REG_PATHcommand" -Value "$WT_PATH -d `"%V%`"" -Force
New-ItemProperty -Path $REG_PATH -Name "Icon" -Value "$ICON_PATHwt.ico"
Enter fullscreen mode
Exit fullscreen mode
Conclusion
Aand that’s it! It should work on all the recent builds on Windows 10. But if it doesn’t work for you, let me know in the comments below and I’ll try to help. 🙂
Hey 😍
Want to help the DEV Community feel more like a community?
Head over to the Welcome Thread and greet some new community members!
It only takes a minute of your time, and goes a long way!
Microsoft released Windows terminal as a Microsoft Store app. How to add it to the context menu or replace ‘Open Powershell window here’ with it ?
asked Apr 24, 2020 at 7:15
Steev JamesSteev James
2,0463 gold badges17 silver badges29 bronze badges
6
There might have been several approaches discussed everywhere, but none of them is up-to-date nor offers flexibility. So I started a new open source project and provided two PowerShell scripts to help.
https://github.com/lextm/windowsterminal-shell
You can run install.ps1
as administrator in PowerShell 7 to easily add the default
layout.
There are other layouts (mini
and flat
at this moment).
Uninstall the menu items are also easy with uninstall.ps1
.
answered May 7, 2020 at 16:34
Lex LiLex Li
58.8k9 gold badges116 silver badges142 bronze badges
11
The Win-X Menu shortcuts are stored in %LOCALAPPDATA%MicrosoftWindowsWinX
and in the ComputerHKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionShellCompatibilityInboxApp
part of the registry, but the file explorer option is the one that really dictates what happens in the Win-X menu. I do not suggest just adding and changing stuff in the WinX
folder because you could mess things up, however, the winaero.com/comment.php?comment.news.30 app in the link provides a way in which you wouldn’t mess it up. Either way, you should put "%programfiles%WindowsAppsMicrosoft.WindowsTerminal_0.11.1121.0_x64__8wekyb3d8bbweWindowsTerminal.exe"
in either a shortcut in the WinX folder, or in the app named accordingly.
answered Apr 28, 2020 at 21:51
Nico NekoruNico Nekoru
2,6072 gold badges17 silver badges35 bronze badges
Вы можете добавить Открыть Windows Terminal от Администратора в контекстное меню Проводника в Windows 10. Эта команда позволит вам открыть приложение с повышенными правами в любой папке.
Когда у вас установлен терминал Windows, он добавляет команду «Открыть в Windows Terminal» в контекстное меню папок в проводнике. В довесок к ней вы можете добавить ещё один пункт, чтобы иметь возможность открыть приложение с повышенными правами в выбранной папке.
Терминал Windows — это современное программное обеспечение для пользователей командной строки, которое имеет множество функций, ранее недоступных в классических инструментах командной строки и PowerShell. Он имеет вкладки, продвинутые средства вывода текста на основе DirectWrite / DirectX с ускорением графики, профили для одновременной работы с PowerShell, cmd и WSL, и ещё много других возможностей.
Благодаря профилям у вас могут быть одновременно запущены экземпляры командной строки, PowerShell и подсистемы Windows для Linux, и вы сможете быстро переключаться между ними. Еще одна замечательная особенность приложения — это то, что его исходный код полностью открыт, так что любой разработчик сможет внести свой вклад в развитие программы.
После установки Windows Terminal добавляет команду контекстного меню «Открыть в Windows Terminal» в меню правой кнопкой мыши Проводника. Вы можете улучшить эту функцию, добавив дополнительную команду, которая открывает Windows Terminal с повышенными правами.
В этом статье будет показано, как добавить команду «Открыть Windows Terminal от Администратора» в контекстное меню проводника Windows 10.
- Скачайте этот ZIP-архив.
- Распакуйте его содержимое в любую папку. Вы можете разместить файлы прямо на рабочем столе.
- Дважды щелкните на файле
Add Open in Windows Terminal as administrator.reg
, чтобы добавить его в реестр операционной системы.
Это всё, что требуется. Изменения применяются моментально. Щелкните правой кнопкой мышки на любой папке в Проводнике, и вы увидите новое меню.
Совет: чтобы позже удалить запись из контекстного меню, используйте файл Remove Open in Windows Terminal as administrator.reg
, который также включен в архив, который вы скачали.
Контекстное меню «Открыть Windows Terminal от Администратора» включает три пункта, которые можно использовать для открытия терминала Windows с повышенными привилегиями в текущей папке.
С помощью можно запустить Windows Terminal c профилем по умолчанию, или с одним из двух предопределенных профилей — Командная строка и PowerShell. Кроме того, вы можете отредактировать загруженные reg-файлы и добавить больше профилей по вашему вкусу, например WSL или любой другой профиль, который у вас есть.
Как это работает
Все пункты контекстного меню используют PowerShell для запуска нового процесса с правами администратора. Важными аргументами командной строки здесь являются -WindowStyle Hidden
, который скрывает окно PowerShell, и Start-Process -Verb RunAs
, который запускает процесс с повышенными правами.
Процесс PowerShell запускает следующие команды с повышенными правами для соответствующих записей контекстного меню:
- wt.exe -d путькпапке для запуска терминала Windows с профилем по умолчанию в текущей папке из проводника.
- wt.exe -p «Command Prompt» -d путькпапке — открыть Терминал Windows с использованием профиля «Командная строка».
- wt.exe -p «Windows PowerShell» -d путькпапке — открыть профиль Windows PowerShell по умолчанию в Терминале Windows в текущем местоположении папки.
На этом всё.
💡Узнавайте о новых статьях быстрее. Подпишитесь на наши каналы в Telegram и Twitter.
Судя по тому, что вы читаете этот текст, вы дочитали эту статью до конца. Если она вам понравилась, поделитесь, пожалуйста, с помощью кнопок ниже. Спасибо за вашу поддержку!
In Windows 11, the context menu “Open Command window here” doesn’t exist by default. Instead, you’ll see the “Open in Windows Terminal” and “Open PowerShell window here” (when you press Shift + right-click) options in the folder context menu.
This article tells you how to add “Open Command window here” (in Windows 11) to open a Command Prompt window in that directory path.
Option 1: Add “Open command window here”
Using a registry edit, you can add the traditional “Open Command window here” option back in the context menu for file system folders (directories) and drives.
- Open Notepad.
- Copy the following lines and paste them in Notepad:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOTDirectoryshellcmdprompt] @="@shell32.dll,-8506" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOTDirectoryshellcmdpromptcommand] @="cmd.exe /s /k pushd "%V"" [HKEY_CLASSES_ROOTDirectoryBackgroundshellcmdprompt] @="@shell32.dll,-8506" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOTDirectoryBackgroundshellcmdpromptcommand] @="cmd.exe /s /k pushd "%V"" [HKEY_CLASSES_ROOTDriveshellcmdprompt] @="@shell32.dll,-8506" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOTDriveshellcmdpromptcommand] @="cmd.exe /s /k pushd "%V""
- Save the file as “
cmdhere.reg
“ - Double-click the file to apply the settings to the registry.
Alternately, you can download the pre-made registry file below:
- Download cmd-here-windows-11.zip
This adds the “Open command window here” option to the right-click menu for folders and drives, which, when clicked, opens a Command Prompt window at the current drive or directory path.
Option 2: Launch Command Prompt via Windows Terminal
As you have noticed, the “Open in Windows Terminal” context menu entry appears when you right-click on a folder in Windows 11. This option launches the Windows Terminal app, a tabbed user interface where-in you can open multiple PowerShell or Command Prompt profiles.
By default, clicking on the “Open in Windows Terminal” context menu option launches PowerShell (the default profile). All you need to do is change the default profile to Command Prompt.
To do so, click on the chevron at the top.
(As a side note, you can see that this dialog allows you to open various console windows such as PowerShell, Command Prompt, and Azure Cloud Shell.)
Click Settings.
Under “Startup,” in the “Default profile” drop-down list box, select Command Prompt.
Save the settings by clicking on the Save button at the bottom.
Close all tabs and the terminal window.
Right-click on a folder or drive, and click “Open in Windows Terminal.” This should launch the Command Prompt tab (profile) using the Windows Terminal app.
Note: The “Open in Windows Terminal” option doesn’t appear for Drives.
Additional Note: Win+X Power User menu
Note that the above Terminal setting also changes the default profile (PowerShell vs. Command Prompt) used when you open Windows Terminal and Windows Terminal (Admin) via the Power User (Win + X) menu.
(The Power user menu is the menu that appears when you right-click on the Start button.)
(For a Windows 10 version of the article, check out Add “Open command window here” to Context Menu in Windows 10. Of course, all of the registry methods mentioned on that page work fine in Windows 11 as well.)
Tested on Windows 11 21H2 OS Build 22000.194. This article was written on 10-October-2021.
One small request: If you liked this post, please share this?
One «tiny» share from you would seriously help a lot with the growth of this blog.
Some great suggestions:
- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
So thank you so much for your support. It won’t take more than 10 seconds of your time. The share buttons are right below.
Windows Terminal — это универсальное приложение, объединяющее в себе возможности командной строки, PowerShell, WLS и обладающее рядом дополнительных функций, которые отсутствуют в этих консольных инструментах. Windows Terminal поддерживается работа с вкладками, визуализация текста на основе DirectWrite/DirectX, возможность создания пользовательских профилей, использование настраиваемых цветовых схем и так далее.
Установленный терминал добавляет в контекстное меню Проводника опцию «Open in Windows Terminal», позволяющее открывать консоль в текущей папке.
Это очень удобно, но вы можете пойти дальше, добавив в то же контекстное меню еще несколько полезных опций.
Допустим, помимо классического Powershell у вас на компьютере установлен еще и Powershell 7, и вы хотите открыть терминал именно во вкладке с этой новой улучшенной консолью.
Здесь как раз вам и пригодится дополнительное каскадное меню.
Для его интеграции в контекстное меню Проводника мы традиционно предлагаем использовать готовые твики реестра, скачать архив с которыми вы можете по ссылке disk.yandex.ru/d/JrY6dAqOluYr_Q
В архиве имеется четыре файла в формате REG: Открыть в Терминале, Открыть в PowerShell 7, Открыть в WLS и Удалить меню.
Первый REG-файл добавляет три подпункта «Профиль по умолчанию», «Командная строка» и «PowerShell», второй твик добавляет пункт «PowerShell 7», слияние третьего файла реестра добавляет в подменю опцию «Ubuntu».
Четвертый твик удаляет добавленные пункты из контекстного меню оболочки операционной системы.
Иконки для PowerShell 7 и Ubuntu в нашем примере отсутствуют, так как эти программные компоненты не установлены у нас на компьютере, если бы они присутствовали, то отображались бы и их значки.
Загрузка…