Column I’m a fan of shell extensions – those plug-ins for Windows Explorer which provide easy right-click access to all manner of context sensitive actions. For example, my favourite ZIP compressor is WinZip: simply right-click on a folder and you can instantly create an archive containing everything within that folder. Magic! But having said that, shell extensions, like other things, should be used in moderation; they can seriously impact system performance if you invite too many of ’em to the party.
Just the other day, I installed a shell extension under Windows XP, the exact details of which needn’t concern us here. Suffice to say that it was badly written, slowed Windows Explorer to a crawl and I’d decided within about two minutes of installing the thing that it was junk. Accordingly, I moused over to the Windows Control panel, fired up Add/Remove Programs and dispatched the grim reaper in the direction of my short-lived plug-in.
The third-party uninstall script duly delivered the coup de grâce, whereupon I was informed that in order to complete the formalities and give the shell extension a Christian burial, it would be necessary to reboot the system. Now, I wasn’t actually given any choice here; just a dialog box with an unfriendly message and an OK button that I needed to press before starting the reboot process. I might as well have been asked, “Would you like me to waste ten minutes of your time?” Oh yes, please…
Do you remember those salad days, those times of innocence when Microsoft informed us that the upcoming Windows XP platform would have none of the unnecessary rebooting that had besmirched the good name of its predecessors? In fairness, I feel that Redmond largely delivered on this particular promise. Aside from system updates (see later!) it’s not uncommon for my main development system to be running for several weeks without requiring a reboot. But unfortunately, many third-party developers don’t seem to have grasped the essential idea that end users have got better things to do with their time than reboot their machines.
Why was Mr. Anonymous Shell Extension telling me that a reboot was necessary? Simple: from a technical point of view, shell extensions are written as COM-based DLL’s that are automatically loaded by Windows Explorer using information found in the registry. Since Explorer was running, the offending shell extension was effectively locked and in use, and couldn’t therefore be automatically deleted by the uninstaller. That nameless programmer, whose only focus was on deleting the shell extension and removing the product directory from the Program Files tree had forgotten the Number One Rule of programming. Namely, that it’s my bloody computer and not his.
What I’d like to have seen would be a polite little dialog box saying “The program has been uninstalled: it will be removed from your hard disk next time you restart Windows.” In other words, confirmation that the job’s been done, coupled with a respectful forelock-tugging hint that you do need to reboot at some point in the future, when it suits you.
Note: for us development-minded types, there’s actually no real need to reboot at all. Type Ctrl-Alt-Del to bring up the Task Manager, click on the Processes tab and you’ll see ‘explorer.exe’ listed as one of the running processes. (You can see where I’m going here, can’t you?) If you select explorer.exe and hit the ‘End Process’ button, Windows Explorer will be terminated. Now, without closing Task Manager, choose the ‘New Task (Run…)’ option from Task Manager’s File menu, type ‘explorer’ and click OK to restart the Windows shell. By closing and reopening the Explorer process, you should find that it has now closed any shell extensions that you have uninstalled, and you can now delete them manually – without having to go through a time-wasting reboot.
This cavalier approach to other people’s computing experience is – it seems to me – becoming increasingly widespread. Another of my fave gadgets is malware/virus detector Prevx. Prevx is a great utility and has kept my PC clean without many of the reliability side effects which seem to plague other anti-virus solutions. But I do have one very minor gripe; every time Prevx auto-updates itself, a fresh shortcut icon is predictably plonked onto my desktop. I wouldn’t mind, but Prevx gets updated frequently. I asked the developers to fix this but, thus far, they haven’t.
Is it really beyond the wit of mortal man for an installer to check if it’s an upgrade rather than virgin install and – if so – check if the shortcut icon has been deleted from the desktop? If it has been, please don’t reinstall it. Better yet, ask the punter whether he wants a shortcut icon first time round, and remember the preference.
Of course, Microsoft is the real master of end user inconvenience. I’ll never forget the time I came into my office one morning to discover my computer had thoughtfully been rebooted during the night as part of a Windows update. Yes, I was dumb to configure the system that way, but I didn’t imagine that anyone at Microsoft was dumb enough to have the system reboot while other applications were running. (Note to MS: If Windows Explorer is running, then it’s probably OK to do an unattended reboot; if other processes from the ‘Program Files’ directory tree are running, then it probably isn’t).
But the masters really excelled themselves with the ‘Restart Now’ versus ‘Restart Later’ dialog that forms part of the aforementioned XP update feature. As we all know, the ‘Restart Later’ button should really be labelled ‘Nag me again in ten minutes and keep at it until I’m a gibbering idiot’. That’s right folks, this is Microsoft’s computer not yours, and if the Redmond crowd want to reboot it, they damn well will. It’s just a matter of breaking your will first.
To make totally sure, the ‘Restart Now’ button cunningly uses ‘N’ as the hotkey so that anyone typing ‘N’ as in ‘No – I don’t want to reboot’ gets instantly snookered. Hahaha – got you.
But that was XP, and now we have Vista. I’m fervently hoping that Vista (as I write, being released today) will usher in a new world of deferential dialogs and discrete system updates predicated around the revolutionary idea that you actually bought your PC in order to get some real work done. Maybe, in time, the rest of the developer community might catch on too. Well, I can dream, can’t I?
Postscript: If you actually develop shell extensions, and you’re tired of continually restarting Windows Explorer, you might want to check this out. Amongst other things, Michael Dunn provides a clever registry hack which causes Windows Explorer to run each Explorer window as a separate process. Close the window you’re working with, and your DLL is immediately unloaded.