Search notes:

Registry: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts

TODO

Calculating hash for UserChoice\Hash

Apparently, Windows calculates a hash after assigning a default application that handles files with a given file extension. This hash is stored in the value Hash under the subkey UserChoice.
This Stackoverflow question has some insteresting answers and notes concerning this hash, such as:
Microsoft decided in Windows 8 (probably for security reasons) that users should be able to set default programs only via the built in GUI. I.e. by design, you are not supposed to be able to set default handlers in a script or programmatically.
Another answer lays out the algorithm for calculating the hash like so:
extension  = ".txt”                                          ; The file extension
sid        = "S-1-5-21-463486358-3398762107-1964875780-1001" ; The SID of the current user
progid     = "txtfile"                                       ; The ProgId of the desired association
regdate    = "01d3442a29887400"                              ; The timestamp of the UserChoice registry key
experience = "a microsoft secret string"                     ; A static string (this is a dummy example, not the real string

hash       =  Base64(MicrosoftHash(MD5(toLower(extension, sid, progid, regdate, experience))))
This Stackoverflow answer also links to this page where an .exe can be downloaded that apparently is able to calculate this hash.
This github repository (Dansys/PS-SFTA) contains a PowerShell Scripts[PowerShell script that implements this algorithm and can be used to set file associations.
Another repository by the same user contains a PureBasic program that seems to indicate that experience is User Choice set via Windows User Experience.
On the other hand, using strings on SetUserFTA.exe reveals this string plus a GUID: user choice set via windows user experience {d18b6dd5-6124-4341-9318-804003bafa0b}.

See also

Windows Settings: Choose default apps by file type
show-winFileExtAssociation
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
HKEY_CLASSES_ROOT\.ext
filename extensions

Index