I want to find the full path of the program that will open a given file type. e.g. '.txt' is opened by c:\windows\system32\notepad.exe

I've done a bit of searching but i keep just finding how to create an association, not read one. I've also tried looking in the registery, but it looks like all that's there is a link to the program ID or something.