26th December 2001

Riddle time: when does an EXE not act like an EXE? When its file association is messed up. But wait! An EXE doesn't have a file association. Or does it? Well, yes and no. The association is... itself. I'm talking about this kind of error: "Windows cannot find PROGRAM.EXE. This program is needed for opening files of type 'Application.'" What to do? Fire up your Registry editor and navigate to HKEY_LOCAL_MACHINE \ Software \ Classes \ Exefile \ Shell \ Open \ Command. Now, whatever value is in there needs to be replaced with the following: "%1" %* (exactly as shown). You should only have to do this when your EXEs have stopped launching properly. %1 in the string defines the object. As a matter of fact, you can also use the %1 trick to change the default icons for BMP, ICO, CUR, ANI, ICL, DLL, or CPL files. Look up at the exefile's DefaultIcon key. See how the data column has a %1? Peruse through the Classes key until you find the filetype name (its extension towards the top of the list will let you know precisely). For instance, BMP is also classified as Paint.Picture. Change its default icon to %1 and you'll have BMP thumbnails in all of Explorer's views instead of the default BMP icon.