When I moved to Windows 11, one of the little things I liked was the addition of Windows Terminal to the start jump list. You get this list by right-clicking on the Start icon in the taskbar or pressing Win+x. Over the years, this list has moved from having an option to open a command prompt to open Windows PowerShell. So I was pleased when it changed to opening Windows Terminal. Especially with an "as Admin" option.
ManageEngine ADManager Plus - Download Free Trial
Exclusive offer on ADManager Plus for US and UK regions. Claim now!
Unfortunately, the latest beta release reverts to Windows PowerShell. I've been told that this was a deliberate decision to avoid having a dead link if the user uninstalled Windows Terminal. Don't even get me started.
I reached out to Paul Thurrott on Twitter regarding this issue, and he provided some references on modifying the start list. Here's how I restored my Windows Terminal link.
Link Groups
The links are stored under %LOCALAPPDATA%, specifically C:\Users\Jeff\AppData\Local\Microsoft\Windows\WinX. Under WinX are subfolders Group1, Group2, and Group3. These directories correspond to the start menu groupings, starting from the bottom. The Group3 folder is where I want to create my link.
You can see the existing links. The numbering reflects how they are ordered on the list. I opened this folder in Windows Explorer and right-clicked to create a new shortcut.
I need the path to the Windows Terminal program, so I grabbed that using PowerShell and pasted it.
(Get-Command wt.exe).source | Set-Clipboard
Next, give the shortcut a name.
After finishing, I knew I wanted the shortcut to run as elevated. If you haven't done this before, open the link properties and click Advanced.
This isn't that difficult.
Check the box and click OK.
Register the Link
Simply having the link in the folder is not sufficient. It apparently needs some sort of Windows voodoo to "register" it. To accomplish this bit of magic, I needed to download a utility called hashlnk.exe. Download the zip file from https://github.com/riverar/hashlnk/blob/master/bin/hashlnk_0.2.0.0.zip and extract the file. I saved it to C:\Work. I was hesitant about downloading a random file, but it was created by a Microsoft MVP years ago and is an open-source project on Github. If it makes you feel better, I didn't have any problems, and ESET didn't raise any flags.
The name of the link file will be used in the list, so I renamed my link.
rename-item '.\Windows Terminal.lnk' -NewName 'Windows Terminal (Admin).lnk'
You'll need the full path to the link file.
$linkpath = (get-item 'Windows Terminal (Admin).lnk').fullname
The registration command is straightforward. Specify the path to the hashlnk.exe, assuming it isn't in your path and the link path as a parameter.
C:\work\hashlnk.exe $linkpath
That's it. You need to log off and back on or kill the Explorer process.
get-process explorer | stop-process
Now I have the Windows Terminal shortcut.
I experimented with adding a number to the .lnk file to control the order, but the number was included in the list output so I deleted the file and started again without it. Once you run hashlnk.exe, I don't think you can do anything else with the .lnk file, so make sure everything is configured the way you want before using it.
Summary
If there is a newer or better way to achieve the same result, especially one that lends itself to automation, I'd love to hear about it. I'm very curious about new alternatives to hashlnk.exe.
> to avoid having a dead link if the user uninstalled Windows Terminal
🤦♂️ Just… have a fallback? It seems like a no brainer to me, no WT then fallback to Windows PowerShell.
Even better, tie it to the default terminal setting (https://devblogs.microsoft.com/commandline/windows-terminal-as-your-default-command-line-experience/)?
It is all very odd. If I never had Windows Terminal installed would I ever have seen that link? Hopefully not. This is another Windows 11 detail that gets in the way.