I have a program that can open two types of files: .animera and .png. I'd like the program to be the default for .animera but not the default for .png. I have this for handling .animera files:
WriteRegStr HKCR '.animera' '' 'AnimeraSprite'
WriteRegStr HKCR 'AnimeraSprite' '' 'Animera Sprite'
WriteRegStr HKCR 'AnimeraSprite\shell' '' 'open'
WriteRegStr HKCR 'AnimeraSprite\shell\open\command' '' '"$INSTDIR\bin\Animera.exe" open "%1"'
WriteRegStr HKCR 'AnimeraSprite\shell\edit\command' '' '"$INSTDIR\bin\Animera.exe" open "%1"'
WriteRegStr HKCR 'AnimeraSprite\DefaultIcon' '' '$INSTDIR\bin\Animera.exe,1'
There seems to be a dozen ways of doing this but the above snippet works perfectly. Hovering shows that the file type is "Animera Sprite", the icon is shown and double clicking opens the program. I tried something similar for .png except that I don't want this program to be the default png viewer. I just want the user to have the option of using this program. Here's what I tried:
WriteRegStr HKCR '.png\OpenWithProgids' 'AnimeraPNG' ''
WriteRegStr HKCR 'AnimeraPNG\shell' '' 'open'
WriteRegStr HKCR 'AnimeraPNG\shell\open\command' '' '"$INSTDIR\bin\Animera.exe" open "%1"'
Right-clicking on a png file and then hovering "Open With" doesn't show the program in the list. So how do I accomplish this?