Bug of the moment 2008-02-09
One of Windows Explorer’s (almost) great features is the ability to create custom actions to be performed on a given file extension. For some strange reason, however, it never occurred to Microsoft to contemplate what should happen when you select multiple files. There’s no flag to select whether to send the files collectively to a single process, or whether to simultaneously start multiple processes, one per file.
You have Send To as a non-contextual way to forward multiple files to a single process, but that’s confusing: you have to remember when to use Send To and when not to.
My goal is to achieve rapid PNG optimisation. In Windows 2000, I’ve set this up using a custom action “Optimise” added to the pngfile file type, which calls on Cosmin Truta’s OptiPNG via the command "C:\Program Files\Xcmd\optipng.exe" "%1" (seen here in XP):
Granted, it throws up a separate copies of OptiPNG for every single file in the selection, but I can live with that. I do get odd results when the files are on the Mac: Explorer only opens one copy of OptiPNG at once and spectacularly fails to redraw its window after each one closes:
Part of the blame seems to be the DAVE SMB client for Macintosh, but Explorer is plentifully buggy regardless.
XP, however, decides to behave rather differently. If I right-click a single image, Optimise invokes OptiPNG as normal. If I select multiple files and click Optimise, the cursor flickers briefly and nothing happens. At first, I blamed DDE, since every time I return to Folder Options, the DDE checkbox is ticked:
No matter what I do, I can’t untick it. But when I checked the Registry for the relevant file type entry, no reference to DDE was anywhere to be found. At a guess, Windows wants it to be on, and is merely dropping collossal hints to the user to re-enable it.
I began clearing out various garbage from the Registry entry, such as printto and various weird and meaningless flags:
However, even when I was down to the sparse set of keys shown earlier, Explorer still wouldn’t behave. For example, there is some shell extension adding bonus options to the context menu that are clearly not defined in the file type itself:
What was a braindead but trivially simple way to optimise a series of images has turned into a nearly useless method because Windows has sabotaged it. What I need – and maybe it exists – is a generic shell extension that completely replicates the actions behaviour but intelligently.
It turns out that the non-launch problem is in fact not a Windows bug at all. It’s a flaw with the contextual menu module shipped with JujuEdit that adds context menu items to all file types. After extensive research, the only reference I could find to this problem was a note that this behaviour can be triggered by defective context menu shell extensions. Since this problem also affected my work PC, I narrowed it down to the shell extensions in common with all computers I use, mainly JujuEdit and 7-Zip. Turns out that JujuEdit's jjshext.dll is the cause.
jjshext.dll is nothing more than a replacement for this Registry key: HKCR\*\Shell so I turned off the shell extension and put the JujuEdit command – which applies to all files, useful as JujuEdit is both a text editor and a hex editor – directly into the Registry.
All of the other defects with Explorer still stand, of course.
Having said that, it may just be something to do with poor support for my Super VGA keyboard:
Who knows how much trouble this thing is causing me?
Posted 9th February 2008 – Comments and questions?