This tutorial allows you to manually set version of microsoft/terminal to be used as default terminal with and without administrative privileges on Microsoft Windows 10 or 11. This tutorial is based of Telegram post. Credits for research: https://t.me/LetITFlyW/10616
Note
This tutorial is for educational purposes only. I am not responsible for any damages that may have caused this. By attempting to follow this guide, you are on your own risk.
Warning
This guide only works with latest microsoft/terminal 1.21 or earlier versions of the application. For currently unknown reasons, 1.22 and up versions of Microsoft Terminal causes graphical bugs while attempting this tutorial. Be warned.
- Download unpackaged version of Microsoft Terminal from GitHub. You can find latest working version for this guide here..
Note
The reason we need unpackaged version of the Microsoft Terminal is because default .msixbundle
version of the application doesnt allow you to use Microsoft Terminal under administrative privileges while executing PowerShell (powershell.exe
or pwsh.exe
) or Command Prompt (cmd.exe
) directly through the shell executables. This mainly because restrictions of Appx packaging with registry key virtualization that are currently imposed by the operating system.
- Extract Microsoft Terminal
.zip
file under any directory you want. - Copy this register editor script below and and save this anywhere under
.reg
extension. Right click the file and clickEdit
. Replace every<path to Microsoft Terminal application directory>
with your extracted Microsoft Terminal application directory. Be sure to escape path separators by replacing\
with\\
in the path. Save the script and run it.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{2EACA947-7F5F-4CFA-BA87-8F7FBEEFBE69}\LocalServer32]
@="<PATH_TO_TERMINAL_DIRECTORY>\\OpenConsole.exe"
[HKEY_CLASSES_ROOT\CLSID\{E12CFF52-A866-4C77-9A90-F570A7AA2C6B}\LocalServer32]
@="<PATH_TO_TERMINAL_DIRECTORY>\\WindowsTerminal.exe"
[HKEY_CLASSES_ROOT\CLSID\{3171DE52-6EFA-4AEF-8A9F-D02BD67E7A4F}\InprocServer32]
@="<PATH_TO_TERMINAL_DIRECTORY>\\OpenConsoleProxy.dll"
[HKEY_CLASSES_ROOT\Interface\{3171DE52-6EFA-4AEF-8A9F-D02BD67E7A4F}\ProxyStubClsid32]
@="{3171DE52-6EFA-4AEF-8A9F-D02BD67E7A4F}"
[HKEY_CLASSES_ROOT\Interface\{59D55CCE-FC8A-48B4-ACE8-0A9286C6557F}\ProxyStubClsid32]
@="{3171DE52-6EFA-4AEF-8A9F-D02BD67E7A4F}"
[HKEY_CLASSES_ROOT\Interface\{746E6BC0-AB05-4E38-AB14-71E86763141F}\ProxyStubClsid32]
@="{3171DE52-6EFA-4AEF-8A9F-D02BD67E7A4F}"
[HKEY_CLASSES_ROOT\Interface\{AA6B364F-4A50-4176-9002-0AE755E7B5EF}\ProxyStubClsid32]
@="{3171DE52-6EFA-4AEF-8A9F-D02BD67E7A4F}"
[HKEY_CLASSES_ROOT\Interface\{E686C757-9A35-4A1C-B3CE-0BCC8B5C69F4}\ProxyStubClsid32]
@="{3171DE52-6EFA-4AEF-8A9F-D02BD67E7A4F}"
- Now that you have registered COM interfaces and classes for Microsoft Terminal, you need to set default terminal for OS to use. In order for this to work, you need to set the Microsoft Terminal as a default terminal application by executing this registry editor script:
Warning
Setting default terminal application via GUI (Settings/Developer settings
) currently doesn't work. This is due to how the unpackaged version does not have support to register themselves as valid default terminal application on Windows. Setting it manually through Windows Registry resolves this issue, even if Settings app does not report Microsoft Terminal as a choice under Developer settings.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console\%%Startup]
"DelegationConsole"="{2EACA947-7F5F-4CFA-BA87-8F7FBEEFBE69}"
"DelegationTerminal"="{E12CFF52-A866-4C77-9A90-F570A7AA2C6B}"
- (OPTIONAL) Unpackaged Microsoft Terminal application does not add shortcuts which are necessary in order for Terminal application to appear in the start menu. To make Terminal application appear in the Start Menu, add
WindowsTerminal.exe
shortcut inC:\ProgramData\Microsoft\Windows\Start Menu\Programs
directory. - That is it. No more
conhost.exe
when running Visual Studio console applications or other applications that rely on administrative access terminals anymore!