New
#1
Registry: Adding a new file type to HKCR\SystemFileAssociations
I want to create a new context menu that is only visible on audio files.
Doing this on an extension-by-extension basis is not a solution because I need the added context menu to be visible when selecting multiple different audio types (i.e. different extensions, such as .wav, .mp3, .flac etc.).
I can get this to work by creating my new context menu key inHKCR\*
but this adds the context menu to every file type (so it appears on non-audio files where the context menu is not wanted).
I did some digging around in the Registry and found the keyHKEY_CLASSES_ROOT\SystemFileAssociations\audio
(there's also ones for documents, images and video).
Adding my new context menu key only to SystemFileAssociations\audio (and nowhere else) works as intended: My context menu shows up on .wav, .mp3, .wma, .aiff, .au, and a few other audio file types, and it remains visible even when selecting across multiple different audio file types in Explorer.
However, the problem is that the audio file formats over which this works is rather limited. It does not work with .flac, .ogg / .oga, .opus and .wv (which are other audio file types that I want the new context menu to show up on).
Does anyone know how I can add these file types to the list of extensions that are already recognized as audio files? (i.e in the same way that .mp3, .aiff and .wav files etc. are being handled)
I've checked the PerceivedType for my audio files, but that makes no difference. I then saw some suspiciously familiar extensions lists in Windows Media Player's file association and MIME type lists (which matched the extensions that had responded to my new context menu) but adding new file types to WMPs extensions and registered MIME types didn't work either.
I even tried (in a clean OS in a virtual machine) installing a codec pack so that pretty much every audio file type could play back in WMP, then I associated all those audio file types with WMP by default to see if that would make these extra audio file types become recognized as belong to the group 'audio', but that didn't work either.
Interestingly, my context menu also got added to .mid files even though they are not audio files (in the sense that they don't actually contain any audio). So there is some kind of music / audio classification of extensions going on somewhere, regardless of the actual content of the file. It's by designation rather than by content.
I have seen other posts on the net mention similar problems with other file association groups (such as 'images' and 'documents' where certain basic files (such as .bmp in the case of 'images') respond and work as intended, but other file types from the same category do not.
What's the best way to achieve the outcome I'm looking for (either by being able to add more audio file types to the existing list of files currently being affected by the 'audio' key in SystemFileAssociations, or perhaps there is another key elsewhere (that already exists, or which could be created) that allows a context menu to be visible on the specified types even when more than one of the specified file types has been selected.