Registry: Adding a new file type to HKCR\SystemFileAssociations

  1.    #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 in HKCR\* 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 key HKEY_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.
      My ComputerSystem Spec

  2.    #2

    Hi, interesting question, and may not be possible as this is simply not how the process has been conceived.

    I think you'd need a tool designed to pick out the perceived type, and add the data to each corresponding key for each such file type.

    There are many context editors around, and I have a few to hand, but none which do that as far as I know.

    I'll throw this in as something which might be of passing interest, but doesn't solve the problem: Nirsoft's Filetypesman
    Click image for larger version. 

Name:	1.jpg 
Views:	2 
Size:	119.7 KB 
ID:	237792

    Also this may be of interest:
    windows - Create context-menu entries for a given extension - Stack Overflow

    Considering 'perceived type' - this is prominent in considering search, rather than anything else..
    Last edited by dalchina; 4 Weeks Ago at 23:12.
      My ComputersSystem Spec

  3.    #3

    I will also throw my hat in the ring and suggest giving Nirsoft's Filetypesmanager a look, I have only used it for icons so far, but using its descriptive text for each file type has allowed me to manually alter icons for e-mail (.eml) and pdf files amongst others.
    The point being these are very hard to change without some digging into how the registry enumerates file types and associated actions.
    Filetypesmanager gives you the insight when you use it to see how filetypes are registered and associated.
      My ComputerSystem Spec

  4.    #4

    For reference only- some deeper documents:
    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).
    Is the perceived type for these specified as audio in your registry? (See Filetypesman listing).
    Perhaps you checked- not 100% sure:
    I've checked the PerceivedType for my audio files, but that makes no difference.
    FWIW I can confirm that a context menu entry I added at
    appears for e.g. mp3's but not ogg, as you say. Both have perceived type set as audio.
    Last edited by dalchina; 4 Weeks Ago at 03:50.
      My ComputersSystem Spec

  5.    #5

    One difference I note between the file types of perceived type audio where the context menu added here

    applies and those to which it doesn't, is that the first have a 'persistent handler', and the latter don't.

    E.g. mp3 does:
    Click image for larger version. 

Name:	mp3 reg HKCR.jpg 
Views:	1 
Size:	48.0 KB 
ID:	237822

    flac doesn't
    Click image for larger version. 

Name:	flac reg HKCR.jpg 
Views:	1 
Size:	40.4 KB 
ID:	237823

    But a persistent handler is related to Windows search:

    Could it possibly be that's why some extensions are picked up and others not? Seems an unnecessary correlation. Yet Indexing Options/Advanced shows no difference between ogg,flac and mp3. So perhaps there's something else to discover.
    Last edited by dalchina; 4 Weeks Ago at 04:37.
      My ComputersSystem Spec

  6.    #6

    My 2 pence was by altering the icon listed under the actual persistent handler that I changed the .pdf and .eml icons. Search for that persistant handler in the registry and maybe add the context menu item there may do what the OP wanted?
      My ComputerSystem Spec


Related Threads
Pretty much what it says in the Header. I am sure this can be done using the correct switched in several tools like robocopy or even X-Copy but so far copying the file including its full path to another location is not working properly for me. I...
Trying to make opening unknown file types a little bit less painful. Is it possible to skip the "Windows can't open this type of file" dialog and go straight to the "Open with" dialog (that...
So lately i found this nifty lil Twitter app that comes with Windows 10 But when i click a tweet with a vine retweet or such it gives me an error saying "Unsupported Video Type Invalid File Type" Has anyone been using the twitter app lately and are...
Hello everyone I would like to edit the file type descriptions of a number of file types on my computer. I mean the text that is written in the "File Type" column. For example, after installing Opera browser, all HTML and HTM files have the...
I've recently upgraded from Windows XP to 10 (64-bit), and the .reg files I've crafted for adding custom file associations don't work anymore. What's changed? How do I make them work again? Sample: Windows Registry Editor Version 5.00 ...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:34.
Find Us