Description
I know the first reaction of the Windows Terminal team will be that JSON is much better than the registry, especially for WSL users, and in most cases I agree, but hear me out on this one.
Windows Terminal automatically detects and add profiles for Microsoft-provided shells and WSL distros, populating the new-tab menu without user intervention.
But 3rd party shells that are Win32 CUI apps need to explain to their users how to add a profile in settings.json manually, as there is no way for Windows Terminal to automatically detect and create the proper profiles entries for all 3rd party apps.
Such shells are regularly installed using MSI packages, which are designed to be declarative target states and really should avoid using MSI custom actions which make them less reliable and impossible to process by some automated deployment tools. Adding a DLL to their installer that goes and tinker with "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" file at install time isn't a solution, and wouldn't work when Windows Terminal is installed after.
I believe the cleanest solution for MSI-deployed Win32 shells would be to provide their profile for WT through the registry, in a well-known registry key such as HKLM|HKCU\Software\Microsoft\Windows Terminal\Profiles\ (HKLM or HKCU depending on whether the shell is installed per-user or globally).
Each Win32 shell could simply add a subkey with its profile GUID in that registry key, without even checking if Windows Terminal is currently installed or not.
Each subkey would contain values that match the profile properties provided in settings.json. These should be individual registry values to allow the installer to provide the targets for commandline, icon, startingDirectory,... as MSI variables depending on the installation directory selected by the user without having to, again, provide some custom action DLL that can generate JSON. It would also make it easy for IT to customize the profile of specific shells in their custom deployment solutions after extracting the declarations from an MSI package.
Whenever WT gets used, even if it has been installed after the shell, it could check that location for 3rd party profiles to be added to the add-tab menu, making the experience so much easier for users. It could also automatically remove profiles for any shell that has been uninstalled.
This isn't a suggestion to replace the JSON file with the registry, but to complement the current system to let 3rd party Win32 shells provide the same level of integration as PowerShell and CMD, and the registry seems like the best solution for those apps as it is supported as part of the MSI declarative packaging system.