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.
Add Open in Windows Terminal as Administrator to Context menu in Windows 10
- 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 folder\pathto launch the Windows Terminal with the default profile in the current folder from File Explorer.
wt.exe -p "Command Prompt" -d folder\path- to open Windows Terminal using the default "Command Prompt" profile.
wt.exe -p "Windows PowerShell" -d folder\path- to open the default Windows PowerShell profile in Windows Terminal to the current folder location.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options: