Microsft Windows Terminal (installed via the Microsoft Store) creates a 0 bytes wt.exe
file which is a Windows execution alias. AFAIK it is somthing similar to a symbolic link, except it seems to be resolved at the CreateProcess
Api level as opposed to a symlink that is translated at the file system.
In powershell:
❯ dir ~\AppData\Local\Microsoft\WindowsApps\wt.exe
Mode Name
---- ----
la--- wt.exe -> C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
❯ Get-Item .\wt.exe | fl
Name : wt.exe
Length : 0
LinkType : AppExeCLink
Target : C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
I wasn't able to find proper documentation for these "new" kind of aliases. Even googling PS AppExeCLink
value is not very useful.
I need a fast way to resolve an execution alias (get the target file) in a C# App. Given my requirements, I prefer an unmanaged (Win32 Api) way over adding a reference to the slow WMI or an external 300kb nuget package.
Thanks!