Totally unsupported hacks - Add Windows Terminal to the Win+X Shortcut menu
You shouldn't do this and if you choose to do this you may hurt yourself or one of your beloved pets.
You have been warned.
The Windows+X hotkey has been around for many years as is a simple right-click style context list of Developer/Administrator stuff that your techies might need in the course of human events.
There's one obscure setting in Settings | Taskbar where you can set the main option for the Command Prompt to be replaced with PowerShell, although that was flipped to "on" by default many years ago.
I want Windows Terminal in that Win+X menu.
Fast Forward to a world with lots of alternative console hosts, Linux running on Windows natively, not to mention cross-platform open source PowerShell Core, AND the new open source Windows Terminal (that you can just go download right now in the Windows Store) we find ourselves in a middle place. We want to replace the default console with the Windows Terminal everywhere as the default but that's gonna be a while.
Until then, we can integrate the Windows Terminal into our lives in a few obvious ways.
- Pin Windows Terminal to your taskbar
- Train yourself to Win+R and run "wt" rather than "cmd.exe" at wt.exe is a shim that launches the store-based Windows Terminal.
- Add Windows Terminal to the Win+X menu.
It is that last one that concerns me today.
The Win+X implementation is a totally bonkers thing that I just don't understand with its origins lost to the mist of forgotten time.
You can go check out
C:\Users\USERNAME\AppData\Local\Microsoft\Windows\WinX and find it full of LNK files. Just drop yours in there, right? Well, I say nay nay!
They didn't want just anyone dropping stuff in there so to add a new application to Windows+X you need to:
- Make or find a LNK file for your application.
- BUT! Your lnk file can't (today?) be a LNK to a Windows Store app - more on that later. They appear to be ignored today.
- Store a special hash in your LNK file per Rafael's excellent writeup here so that they are considered "Approved Links."
- Make a new Group 4 folder in the \WinX folder above OR update Group 3 and copy your link in there considering the numbering scheme.
- Note the ordering in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ShellCompatibility\InboxApp
Here's my WinX\Group3 folder . Note the shortcut at the top there.
I wanted to find a link to the Windows Terminal but it's harder than it looks. I can't find a real LNK file anywhere on my system. BUT I was able to find a synthetic one and make a copy by going "Win+R" and running "shell:AppsFolder" which brings you to a magic not-a-folder folder.
That is a folder of lies. I tried making a copy of this LNK, moving it to my deskop, hashing it with Rafael's util but it's ignored, presumably because it's a Windows Store LNK. Instead, I'll head out to cmd.exe and type "where wt.exe" to find the wt.exe shim and make a link to that!
These files are also lies, but lies of a another type. Zero byte lies.
Right-click wt.exe and Create Shortcut. Then drag that shortcut out of there and into somewhere else like your Desktop. You can then use hashlnk and move it to the WinX folder.
OR, you can use this scary and totally unsupported utility hosted at a questionable website that you have no business visiting. It's called Win+X Menu Editor and it was a chore to download. So much so that I'm going to hide a copy in my DropBox for the day in the near future when this utility and website disappear.
Be careful when you go download this utility, the site is full of scary links that say Download Now but they are all lies. You want the subtle text link that points to a ZIP file, just above the Donate button that says "Download Win+X Menu Editor."
In this utility you can add an item that points to your new WT.LNK file and it will use Rafael's code and copy the LNK file to the right place and re-number stuff if needed. Again, be careful as you never know. You might mess up your whole life with stuff like this. It worked for me.
And there you go.
Lovely. Now IMHO in some ideal future this should just happen out of the box, but until then it's nice to know I can do it myself.
Sponsor: Looking for a tool for performance profiling, unit test coverage, and continuous testing that works cross-platform on Windows, macOS, and Linux? Check out the latest JetBrains Rider!