Jump to page content

Un-Asked Questions

Questions nobody ever asks

  1. How can I get rid of MSOHTMED.EXE?
  2. How can I get rid of the “is offline” icon badge on my files?
  3. How can I drop files onto a Perl script in Windows?

Answers

Regaining ownership of .html files in Office 2003

When you install Microsoft Office 2003, it has an obsessive need to take over as your HTML icon handler and editing handler. I don’t imagine that earlier or later versions are much if any different but version 2003 is the one I use in the office. You will find your HTML file association to look something like the following:

[HKEY_CLASSES_ROOT\FirefoxHTML\DefaultIcon]
@="\"%1\""

[HKEY_CLASSES_ROOT\FirefoxHTML\shell\Edit\command]
@="\"C:\\Program Files\\Microsoft Office\\OFFICE11\\msohtmed.exe\" %1"

The first step to remove this is supposedly (in Word 2003) Tools → Options → General → Web Options, but I don’t see now the option that used to be there. However, the Registry will sometimes restore itself. To put everything back as it was, enter the following commands (where OFFICE11 is Office 2003):

cd "%programfiles%\Microsoft Office\OFFICE11"
regsvr32 /u MSOHEV.DLL

This will restore your previous Registry settings. There is a similar one to remove to stop Office interfering with your XML files, but I forget which.

Removing the synchronised badge on icons

When a copy of a file is being synchronised and held in Offline Files, Windows Explorer sees fit to put an annoying badge onto the icon, that covers over the shortcut badge of any shortcuts. The only purpose these icons appear to have is to thoroughly clog up your desktop, preventing you from seeing icons correctly or determine which files are shortcuts (especially if you’ve set Explorer to not add the worthless “Shortcut to” to shortcut names. How do you remove these useless badges, correctly known as “shell icon overlays”? Simple: remove the following Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Offline Files. There, all gone.

Shell icon overlays are well understood, but this was one of those things that took me an age to track down due to not knowing that Microsoft calls their icon badges “overlays”. Likewise, finding out anything about the size grip in the corner of a window in Windows is very difficult if you only know of it by another name, such as the Macintosh term of “grow box”.

Using Perl scripts as droplets

Wouldn’t it be nice if you could use Perl scripts in Windows as “droplets”? You can drop files onto VBScript and JScript files to pass them to the script as arguments; why does this not work with Perl scripts? You need to copy the dragon-droppings handler used by Microsoft’s languages, and add it to Perl scripts, like so:

[HKEY_CLASSES_ROOT\Perl.Win32\shellex\DropHandler]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"

Here, I’ve used a special file extension and type (.wpl and Perl.Win32 respectively) to provide a dedicated icon and behaviour for scripts intended to be used in a graphical environment, that run through ActiveState’s wperl.exe, so that a console window doesn’t flash up needlessly, especially if I’m using wxWidgets for my interface.