I added a new file extension to the windows compressed file using the following regedit script and it works perfectly (mostly)
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.zab]
@="CompressedFolder"
"Content Type"="application/x-zip-compressed"
"DontCompressInPackage"=""
"PerceivedType"="compressed"
[HKEY_CLASSES_ROOT\.zab\OpenWithProgids]
"CompressedFolder"=""
[HKEY_CLASSES_ROOT\.zab\PersistentHandler]
@="{098f2470-bae0-11cd-b579-08002b30bfeb}"
Now I want to change .zab file icons to something different from the .zip icons. I have tried both DefaultProgramEditor and FileTypesMan program to change the icon but both change both zip and zab file extensions because they are both compressed file types aka share the same progID in the registry.
How would I go about changing the icon for just the .zab extension? Is there a way to add a "sub progID" to compressed file type and then assign .zab to that sub type and then give it a new icon?
Backstory: I have some audio books that I keep each book zipped and stored with the ebook. I want to use a specific program to open and play this specific extension without having to extract the entire book each time, but I also want the ability to see inside the compressed file in windows explorer without extracting. So yes I want zip and zab to be seen as compressed files by Windows Explorer and the program I use to listen to them with, but I want an easy icon to easily see the zab files.
I have found How to change the icon associated with a particular file format (and only that file format) on Windows 10? and https://learn.microsoft.com/en-us/windows/win32/shell/how-to-assign-a-custom-icon-to-a-file-type?redirectedfrom=MSDN but they don't seem to be quite what I want and found https://www.winhelponline.com/blog/change-default-icon-file-type-windows/ "It’s possible to change the default icon for a file type without affecting other file types. To do that, you’ll need to create a new file class or ProgID for the file extension, and assign the default icon in the newly created file class." but I am not proficient enough to create with without examples and once again this doesn't quite seem to fit as I want to keep the file class the the same so that both function in file explorer as compressed files.
(edited all .zap to .zab, (dyslexia such fun /sarcasm) and now you might understand why I'm so insistent on zab and zip having different icons)