Add Open in Windows Terminal as Administrator to Context menu

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.

Advertisement

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.

Add Open In Windows Terminal As Administrator Context Menu

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.

Add Open In Windows Terminal UAC Prompt

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.

Windows Terminal Running As Administrator In The Current Folder

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:

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

  1. TECNOLOGIA PER TUTTI

    THANKS MASTER

    Reply
    1. Sergey Tkachenko Post author

      You are most welcome.
      However, I am not your master.

      Reply
  2. CHINA JAPAN KOREA

    download links NOT WORKING

    Reply
    1. Sergey Tkachenko Post author

      work perfectly here.

      Reply
  3. SCBright

    Thanks! It is working perfectly, good job!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *