HOWTO: Fix Default Actions for File Types in Windows
PROBLEM: You just installed your favorite image editing application (Photoshop, GIMP, etc.) and now the default action of Preview is replace with the default action of Open, which opens the image in said image editor. While Preview is still available, it can only be accessed with a right-click menu.
REASON: The Windows registry is screwy in how it handles extensions, their descriptions, and available actions (verbs).
HKEY_CLASSES_ROOT ├─[extension] │ ├─(Default) [arbitrary-identifier] │ ├─Content Type [full-mime-type] │ └─Perceived Type [root-mime-type] ├─OpenWithList │ ├─Program1 │ ├─Program2 │ └─Etc. ├─OpenWithProgids │ ├─[arbitrary-identifier] │ ├─[arbitrary-identifier] │ └─Etc. ├─[arbitrary-identifier] │ ├─(Default) [human-readable-name] │ ├─DefaultIcon │ │ └─(Default) [path-to-icon] │ ├─shell │ │ ├─(Default) [action] │ │ └─[action] │ │ └─command │ │ └(Default) [command-line]
As you can see from the tree (or maybe not), the original intention was to easily accommodate programs that can handle multiple extensions. By registering multiple file extensions to a single [arbitrary-identifier], you only need one [arbitrary-identifier] to open them all. The problem is that [arbitrary-identifier] gets to define the extension AND the available actions. This often leads to things like every image becoming an Adobe Photoshop Image or every RTF (Rich Text Format) and WPD (Word Perfect Document) becoming a Microsoft Word Document.
And so no one accuses me of over-simplifying, there are other ways to add to the available list. But this involves Class IDs (and MIME types, I think) and a lot of extraneous jumping around in the registry and shouldn’t be messed with casually.
SOLUTION:
- Open up regedit.exe and browse HKEY_CLASSES_ROOT for each extension you want to change. HKEY_CLASSES_ROOT is the very first key, and the extensions are the first entries.
- Take note of each [arbitrary-identifier] in HKEY_CLASSES_ROOT\[extension]\(Default)\[arbitrary-identifier].
- Change HKEY_CLASSES_ROOT\[arbitrary-identifier]\shell\(Default) for each [arbitrary-identifier] to the action you wish to take by default.
EXAMPLE:
Changing the default action for .BMP files back to Preview after GIMP installation.
- Open up regedit.exe and browse HKEY_CLASSES_ROOT for .bmp
- HKEY_CLASSES_ROOT\.bmp\(Default) = GIMP-2.0-bmp
- Change HKEY_CLASSES_ROOT\GIMP-2.0-bmp\shell\(Default) to Preview
Note that GIMP tries to play nice and does not lump all image formats into one identifier.
Pam 2:14 pm on January 8, 2012 Permalink |
This is exactly what I am trying to do but I have windows 7 ultimate 64 bit and in HKEY_CLASSES_ROOT\.jpg I don’t have a \(Default) key. I have \OpenWithList, \OpenWithProgids and \PersistentHandler. Do I need to change something in regedit or is this missing from Windows 7?
Thanks,
Pam
Pam 2:36 pm on January 8, 2012 Permalink |
Sorry–in my previous reply I said I didn’t have the /(Default), but what I really don’t have is the HKEY_CLASSES_ROOT\.jpg\shell. Windows 7 Ultimate 64 bit.