To do it manually, you would use the assoc command to associate extensions to file types and the ftype command to associate a file type with an application. For example, if you had an extension named .ldg that was used by a program named ledger.exe, you would create a file type called, say, myaccs. To run the commands open a Run window (Windows Logo key+R), type cmd and press Enter. The manual assoc and ftype commands would be:
assoc .ldg=myaccs (make sure you use a unique name for filetype, otherwise chaos will prevail, check the registry if in doubt)
assoc .acc=myaccs (i.e. more than one extension can be associated to a file type)
ftype myaccs= %SystemRoot%\Program Files\ledger.exe %1(this is the location of the program)
Now, when...