Washing Windows: the Registry

This’ll be short I hope. Seriously, that last entry was supposed to be about the little trouble I had with making one of my icons change back into what it was not too long ago.

The problem began when I noticed that my mp4 files’ icon had changed. I had recently decided to include MPC when installing the newest version of CCCP over the old version. I already had and used a standalone MPC, but I was having trouble with something (which I managed to figure out later on), so I gave it a shot. So, I let all files be associated to the CCCP version of MPC, and deleted the standalone one. Lo and behold, the icons had changed!

Now, why such a thing should happen, I don’t know. I tried using the Folder Options to change it back, but I couldn’t find the icon I was using. In truth, I didn’t set the icon in the first place, but I liked the look of it. It was unique. So, I tried changing the icon for MP4 Files to the one I had used before, but I couldn’t find it. I looked at the icon of a file that hadn’t been affected by randomness, and I saw that the icon, when blown up, was actually just the “sheet of paper with a folded corner” and the MPC logo (reduced in size) icon on top. I didn’t recognize that that’s what it was because the detail and colour is missing in the reduced MPC logo. Well, problem solved right? Wrong. While, I’m sure there’s some way to actually produce an icon that looks like that, perhaps by superimposing a reduced MPC icon on that sheet of paper, I couldn’t google it within ten minutes and gave up.

So, I decided, “Well, if I know that this type of file has this kind of icon, I should be able to find that information in the registry.” And it wasn’t. In the registry, there are a bunch of keys for all the file extensions. Many, but not all, of these extensions have two values (aside from the default) that denote content type and a perceived type, as well as some sub-keys. For example, file extension “.mpg” has content type “video/mpeg” and perceived type “video”. There are four sub-keys: OpenWithList, OpenWithProgIds, PersistentHandler, ShellEx. OpenWithList has one sub-key, “wmplayer.exe” which doesn’t have a value set; ShellEx has two sub-keys which appear to be GUIDs.

I omitted is that these extensions are all keys within HKEY_CLASSES_ROOT, and that the default value of the extension key is actually another key within the same root. That value apparently specifies the file type. But this slightly confuses me because within the extension’s key, there’s already two values that denote the type. Ignoring that quirk, I find the key in the same “folder” (HKCR, as noted above). So, “mpcfile” is the key I was looking for (because it had the right icon). It doesn’t say anything much. A useless EditFlags key, a series of sub-keys which just say what program should open the file (which is interesting, considering the extension itself had a OpenWithList key). There were also a couple extra values “mplayerc.exe.bak” in there which noted the now-deleted version of MPC that I had used before. I deleted those values because they were useless.

So, I compared mpcfile to mpegfile. In mpegfile, there’s a key DefaultIcon. That tells me something, but it wasn’t useful. I didn’t have a particular icon to point to. So I looked at mp4file. No default icon, just some useless stuff. Long story short, I deleted the .mp4 and mp4file keys, then re-added them in the mould (I only use “mold” for the type of fungi) of .mpc and mpcfile. Lo and behold, it works. The memory of what happened is a bit old now, despite it only happening a couple hours ago… thanks to my last post.

My point is that the registry doesn’t make a lot of sense sometimes. You can change some things, but there’s no guarantee it will change (until you restart or ever). There are other reasons.

Extensions have a content type value, a perceived type value, and a default value which refers to an actual type…. The actual type defines what opens the file (that’s all that seems to be needed), and sometimes DefaultIcon and a default value that says what to put under “Type” in Explorer. Well, if we’re going to be anal about having our common information on a type in one neat little container, why not include the content type and perceived type in there?

I can understand having the OpenWithList in the extension key. For example, .nfo is apparently an MSInfo.Document (which is actually annoying), but is normally used as a sort of text file. Now, what’s strange is that .nfo doesn’t even specify OpenWithList as a sub-key! I found that strange, so I went and found a file with .nfo as the extension. I check and find that I the list shown under “Open With” in Explorer is exactly what I expected: System Information (the default program), and Notepad (which I normally use). Okay, so what the hell is OpenWithList for anyways?

Digging a little deeper tells me that there are multiple ways to get add to the open with list. To test out what would happen if I were to set the default program to notepad for files with .nfo as an extension, I went ahead and did it. A value was added to the key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.nfo …Yeah. The value was “Application” with data of “NOTEPAD.EXE”. That’s fascinating isn’t it (is anyone following me?).

But seriously, the registry is ridiculously complex. Although it was never meant for any average user to see, for those of us who want to fix things that Windows breaks, it’s a necessary thing to do. There are registry cleaners which can be used to do some routine procedures (removed useless and unused keys, like unused file extensions), but they can’t solve problems like the one I had. You could very well say that I should’ve just chosen another icon or that it’s not reasonable to believe that Microsoft would tailor their system to allow such a trivial task, but why not? Perhaps I can send that as a suggestion: “Please allow me to revert my icons back to normal if they get changed by some freak accident.” or “Please let there be an option to use that sheet of paper template manually instead of only when Windows feels like using it.”

I admit, this is a lame example of the registry’s amazing complexity and retardedness, but it’s effective enough to show the frustration involved in even the most mundane of situations. Imagine how much worse it would be if you ever encountered a real problem that could only be fixed in the registry. Scary….

So, um…yeah. That wasn’t short. 😛


2 Responses to Washing Windows: the Registry

  1. Alvare says:

    you are right, i had a similar problem and the first place y went to was the registry, but i couldn’t do anything because of what you explained, so after googling a little y found the Control Panel entry Folder options, and i edited it form there…but…did you expected XP to solve it that easy? No. After i time the html icons changed at random, and i couldnt fix it so far. so well i love editing the registry but i hate when it leads nowhere.

  2. Hey, thanks for the input Alvare!

    Check out the link above for my own experience with changing the icon for html to the Firefox icon.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: