I’m having hard times figuring out why this doesn’t work on my computer. I’ve read this article http://msdn.microsoft.com/en-us/library/bb776820.aspx and tried it, and it works for an unknown file type, but for know such as .bmp it doesn’t – I’ve also deleted other keys under .bmp – didn’t help. I’ve tried this in HKEY_CLASSES_ROOT.bmp and in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.bmp
I need to implement this in my program so it has custom context menu items on some file types like bmp.
btw. I’ve tried ContextEdit (a freeware program) – also didn’t work – any ideas? Maybe something not refreshing (I’ve tried to reboot – didn’t make any changes)?
edit:
One update – if I go under Set Default Programs and Windows Photo Viewer for some reason I can’t disable it for some file types like .jpg, .bmp, .gif. That’s strange…
edit no. 2:
now it started working and I have determined the problem – the file associations didn’t refresh even after restarting my computer. After I had associated a txt file to a different editor my .bmp menus, icon and default program have changed. So the main question now is – how do I manually refresh file associations using C#?
I think I’ve found a solution for this one, and it goes like this – define:
Then do your code stuff with associations when needed, and after it execute:
Also if mentioned registry keys don’t work try: