Add Open in Windows Terminal as Administrator to Context menu

WIndows Terminal Icon

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

  1. Download the following ZIP archive: Download ZIP archive.
  2. Extract its contents to any folder. You can place the files directly to the Desktop.
  3. Double click on the Add Open in Windows Terminal as administrator.reg file to merge it.
  4. 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\path to 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.

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!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

6 thoughts on “Add Open in Windows Terminal as Administrator to Context menu”

  1. It would be great to have a simple version with no submenus (for people who don’t have standard terminal named profiles), perhaps one that only appears when shift key is held down to save clutter and uses the standard Windows Terminal icon.

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.