Windows Terminal lets you open Command Prompt, Windows PowerShell, etc., in one window. If you want to add Open Windows Terminal as administrator option in the context menu, here is how you can do that. Although you can find the Open in Windows Terminal option in the context menu by default, you can add another option to run the same app with administrator permission.
At times, you may need to execute many commands in either Command Prompt or Windows PowerShell to perform a particular task on a Windows computer. There could be times when you need to open them side by side to get something done. Instead of opening multiple Command Prompt or Windows PowerShell windows, you can use the Windows Terminal on your Windows 10 computer.
By default, it adds an option in the right-click context menu to open a window quickly and enter your command. However, it doesn’t open with administrator privilege. On the other hand, some tasks need to be done with administrator permission or in an elevated window. That is why you can follow this tutorial to add an option to open the elevated Windows Terminal in the context menu.
We have seen how to add an expandable context menu item to open Windows Terminal in ANY Profile, now let us see how to add context menu items to run them as administrator.
Related: How to open Windows Terminal as administrator in Windows 11.
As you are about to use the Registry Editor to get this change, it is highly recommended to create a System Restore point before following the steps.
Add Open Windows Terminal as administrator to Context Menu
To add or remove Open Windows Terminal as administrator to the context menu, follow these steps:
- Open Notepad on your computer.
- Paste the following text.
- Click on File > Save As.
- Choose a location, enter a file name with .reg extension.
- Select All Files from the Save as type drop-down list.
- Click the Save button.
- Double-click on the .reg file and click the Yes button twice.
To learn more about these steps, keep reading.
At first, you have to open a .reg file as it is quite a task if you want to navigate each path and create the respective Key, REG_DWORD, and String Value.
To do that, open Notepad on your computer and paste the following text:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\OpenWTHereAsAdmin] "HasLUAShield"="" "MUIVerb"="Open in Windows Terminal as administrator" "Extended"=- "SubCommands"="" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\001flyout] "MUIVerb"="Open in Windows Terminal Default Profile as administrator" "HasLUAShield"="" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\001flyout\command] @="powershell.exe -WindowStyle Hidden \"Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-d','\"\"\"%V\"\"\"')\"" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\002flyout] "MUIVerb"="Open in Windows Terminal Command Prompt as administrator" "Icon"="imageres.dll,-5324" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\002flyout\command] @="powershell.exe -WindowStyle Hidden \"Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-p','\"\"\"Command Prompt\"\"\"','-d','\"\"\"%V\"\"\"')\"" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\003flyout] "MUIVerb"="Open in Windows Terminal PowerShell as administrator" "HasLUAShield"="" "Icon"="powershell.exe" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\003flyout\command] @="powershell.exe -WindowStyle Hidden \"Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-p','\"\"\"Windows PowerShell\"\"\"','-d','\"\"\"%1\"\"\"')\"" [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenWTHereAsAdmin] "HasLUAShield"="" "MUIVerb"="Open in Windows Terminal as administrator" "Extended"=- "SubCommands"="" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\001flyout] "MUIVerb"="Open in Windows Terminal Default Profile as administrator" "HasLUAShield"="" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\001flyout\command] @="powershell.exe -WindowStyle Hidden \"Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-d','\"\"\"%V\"\"\"')\"" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\002flyout] "MUIVerb"="Open in Windows Terminal Command Prompt as administrator" "Icon"="imageres.dll,-5324" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\002flyout\command] @="powershell.exe -WindowStyle Hidden \"Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-p','\"\"\"Command Prompt\"\"\"','-d','\"\"\"%V\"\"\"')\"" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\003flyout] "MUIVerb"="Open in Windows Terminal PowerShell as administrator" "HasLUAShield"="" "Icon"="powershell.exe" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\003flyout\command] @="powershell.exe -WindowStyle Hidden \"Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-p','\"\"\"Windows PowerShell\"\"\"','-d','\"\"\"%V\"\"\"')\""
You can also customize the text where it says Open in Windows Terminal as administrator or Open in Windows Terminal Default Profile as administrator or Open in Windows Terminal Command Prompt as administrator or Open in Windows Terminal PowerShell as administrator.
Click on the File > Save As option > choose a location where you want to save the file > give it a name with .reg extension (for example, adminterminal.reg), choose All Files from the Save as type drop-down list, and click the Save button.
Double-click on the .reg file and select the Yes option twice to confirm the change. Now you can find the Open in Windows Terminal as administrator option next to the Open in Windows Terminal option in the context menu.
If you wish, you could download our ready-to-use Registry file to add this context menu item.
In case you want to remove the elevated Windows Terminal option, open the Registry Editor and navigate to these two paths:
HKEY_CLASSES_ROOT\Directory\Background\shell\OpenWTHereAsAdmin HKEY_CLASSES_ROOT\Directory\shell\OpenWTHereAsAdmin
Right-click on OpenWTHereAsAdmin > select the Delete option and confirm the change.
That’s all!
Read: How to Remove Open in Windows Terminal from Context Menu.