Cover | Table of Contents | Colophon
Annoyances.org wrote several years ago,
"whoever came up with the `dragging an application
creates a shortcut' behavior must be shot immediately."
Now, dragging an EXE file works the same as dragging any other type
of file. See Chapter 2, for details,
exceptions, and helpful tips.
HKEY_USERS and
HKEY_LOCAL_MACHINE can be thought of as the only
true root keys,
because the Registry's three other
root keys are simply symbolic links, or "mirrors," of
different portions of the first two (see Section 3.1 earlier in this chapter). This means
that only these two branches actually need to be stored.
HKEY_USERS
and
HKEY_LOCAL_MACHINE branches in two files,
User.dat and
System.dat, respectively. On a single-user
system, both files are located in your Windows
folder; on a multiple-user system, the User.dat
file for each configured user is stored in that user's personal
folder. These files are all hidden, meaning that with
Explorer's default settings, you won't be able to see or
find them. To view hidden files, select Folder
Options from Explorer's View menu, choose the View tab, select the Show all files option, and click OK.
HKEY_LOCAL_MACHINE\HARDWARE, which is built up
each time Windows is started (an artifact of Plug and Play). Only
static (non-dynamic) branches are stored on your hard disk.
REGEDIT4 [HKEY_CLASSES_ROOT\.txt] @="txtfile" "Content Type"="text/plain" [HKEY_CLASSES_ROOT\.txt\ShellNew] "FileName"="template.txt"
REGEDIT4, tells Windows that this
file is a valid Registry patch; don't remove this line. The
rest of the Registry patch is a series of key names and values. The
key names appear in brackets (ShowSplashScreen,
with its contents set to 1; changing the
1 to a 0 would most likely
result in turning the option off. Other times you'll see a
long, seemingly meaningless series of numbers and letters. Although
there are no strict rules as to how values and keys are named or how
the data therein is arranged, a little common sense and intuition
will get you through most situations.
HKEY_CURRENT_USER
branch. Select Export Registry File from the Registry menu, and export the entire branch to
a file called User1.reg (or something like
that), stored somewhere convenient, such as your desktop. Then,
select the HKEY_CLASSES_ROOT\.bmp\ShellNew entirely, and no
Registry patch can do that.
Call RegistryDelete("HKEY_CURRENT_USER\.bmp\ShellNew", "")
Sub RegistryDelete(KeyName, ValueName)
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite KeyName & "\" & ValueName, ""
WshShell.RegDelete KeyName & "\" & ValueName
End Sub
Call RegistryDelete("HKEY_CURRENT_USER\.bmp", "Content Type")
(default) value of a key (which
can't be deleted), just use a standard Registry patch, and
simply set the default value to an empty string
(@="").
Return to Windows Me Annoyances