I have a simple problem, but for the life of me I can not find a simple solution. I have spent my programming life assiduously avoiding the use of OLE and COM objects except where absolutely necessary… and now I find myself stuck with no idea how to avoid a slew of completely unsatisfying hacking into this ugly, ugly world. Bah!
All I want is to add a few extra options for the explorer’s context menu, and this much I have done, with both JujuEdit and JujuTool adding extra options available for all files. So far so good. But try double-clicking on an unknown file type, and instead of getting the system asking you how you would like to open unknown file type X, instead you will get either JujuTool’s "Open Container" command or the unknown file will open in JujuEdit. This is not good. It’s bad.
How useful can a software technology be, if to do one of the simplest things you can think of requires hundreds of lines of code, several hours of work, at least an extra DLL on the client system, and modifications to your installer… personally I think that qualifies the "technology" as being utter shite!
So how the hell do I add an option to the context menu without it becoming the default for unknown file types? Well, as far as I can tell, I have to add a context menu handler. This is about a hundred times the work that it took to get to the current level of functionality just adding basic registry entries. It’ll probably take about a day of forehead slapping screwing about with OLE and COM just for me to figure out how to get the desired effect, and another day to implement it. I really really don’t want to do it, because it really really shouldn’t be this complex!
This kind of crap is exactly why people’s computers get slower and flakier as you install more stuff on them: it gets so that every time you so much as look at a file, some DLL procedure has to be called to tell you what options are available for it… isn’t this what the registry is supposed to be for?