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
RegistryDelete
subroutine, listed immediately after. Simply put the full path of the
Registry key you wish to delete between the quotation marks, making
sure not to include a trailing slash (a
"\" at the end).
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
(@="").
Program
Files and
Progra~1, you may want to just search for
progra, which will trigger both variations.
Because this will trip upon other uses of the word
program, try placing a backslash ( \ ) in front of it, like this:
\progra, to limit the search to only directory
names beginning with those letters. A minute of mental preparation
can save you an hour of searching.
Optimize=1 to Optimize=0 in
the Scanreg.ini file. For more information on
the Scanreg.ini
file and the Registry Checker utility, see
Section 3.3 earlier in this chapter.
[Names] name1=Benjamin name2=Doug name3=Gary [Cities I've visited] name1=Brockway name2=Ogdenville name3=North Haverbrook
[...]); the lines that follow are the settings
contained in that section. A section continues until the next section
begins or until the end of the file. Settings include a setting name,
followed by an equals sign, and then the data assigned to that
setting.
http://www.annoyances.org for more
information on downloadable software:
http://www.annoyances.org. See Appendix A for details.
http://www.creativelement.com.