0

Windows 8 added metro apps. Since Metro apps are not run the same way as other programs, the file association seems to be different from other programs. How are files associated in Windows?

4
  • 1
    Please define what you mean by "Weird". How do you find it any different than in previous versions? What's the/an actual problem you face where this info would be useful to know? May 13, 2015 at 15:16
  • Option 2 of this tutorial would be my choice. ==> eightforums.com/tutorials/…
    – whs
    May 13, 2015 at 17:38
  • This was different because metro programs have to be launch on a layer above the normal OS. If you follow the way that normal programs are associated (so all older OS's) they are just mapped to a DelegateExecute which is a CLSID with no textual information. I was trying to pragmatically find file associations for a given extension. I couldn't find this documented anywhere so that's why it would be useful.
    – Matt
    May 14, 2015 at 16:08
  • whs - yes that would be my choice if I wanted to associate a file with a program too. But this question (and answer) was in understanding how it works.
    – Matt
    May 14, 2015 at 16:12

1 Answer 1

1

The default opening type is indicated under the user choice key in: HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\.[desiredFileExtension]\\UserChoice\\ProgId

If this key does not exist the default: HKEY_CLASSES_ROOT\\.[desiredFileExtension]\\(default)

This type must then be checked to determine what to do with it, it is checked in: HKEY_CLASSES_ROOT\\[openingType]\\shell

The default here should tell you what verb is used which is under shell for example: HKEY_CLASSES_ROOT\\[openingType]\\shell\\open

The command that is run is under: HKEY_CLASSES_ROOT\\[openingType]\\shell\\[verb]\\command

If the command is not a DelegateExecute, you are done! Yay, otherwise you must keep digging...

Under the verb should contain ActivatableClass and PackageId: HKEY_CLASSES_ROOT\\[openingType]\\shell\\[verb]\\ActivatableClassId HKEY_CLASSES_ROOT\\[openingType]\\shell\\[verb]\\PackageId

Remember these values and check the value at: HKEY_CLASSES_ROOT\\ActivatableClasses\\Package\\[PackageId Value]\\ActivatableClassId\\[ActivatableClassId Value]\\Server

Lastly check HKEY_CLASSES_ROOT\\ActivatableClasses\\Package\\[PackageId Value]\\Server\\[Server Value]\\EXEPath

Now you/Windows know what application is associated with the desired file type! Easy huh?...

Note: I figured this out after about a week of just going through the registry manually and figured I should post it on here if anyone ever needed it again. If I missed something or stated something wrong please let me know.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .