One file type that??™s always getting munged is the .url (Internet Shortcut)
type, and repairing it can be a little tricky. For one, .url files don??™t launch
your web browser directly; instead, they activate a Windows .dll that does
the launching. In essence, it??™s a two-step process that employs two different
file types; the following sequence of Registry keys shows how it works.
By default, the keys discussed here are all locked to prevent
casual changes, a fact that should??™ve prevented them from
being corrupted in the first place. (Alas, such things seem to
happen anyway.) If Windows won??™t let you make changes to
any of these keys, you??™ll need to take ownership of them
first, as described in ???Prevent Changes to a Registry Key,???
earlier in this chapter, and in Chapter 8.
146 | Chapter 3: The Registry
1. Go to HKEY_CLASSES_ROOT\.url, and confirm that the (Default) value is
set to InternetShortcut.
2. Next, go to HKEY_CLASSES_ROOT\InternetShortcut\Shell\Open\Command,
and make sure the (Default) value here is set to:
rundll32.exe shdocvw.dll,OpenURL %l
This command instructs Windows to crack open the selected
Internet Shortcut file, read the URL stored inside (which you
can also do with Notepad, by the way), and then launch the
program appropriate to the variety of URL. Notice that the
default web browser (e.g., Internet Explorer, Firefox, etc.)
isn??™t yet part of the equation.
3. Internet shortcuts also use an ???icon handler??? by default (explained in
???Change the Icon for All Files of a Type,??? earlier in this chapter), which
chooses an icon for each file depending on the type of URL inside.
Pages:
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223