February, 1999—If the subject seems vaguely familiar, you're right.
My “The Registry Revealed” appeared in the February 1997 issue of Windows
Magazine, and fortunately (for me, at least) the Windows 98 machine
is no less dependent on the Registry than was its predecessor. At first
glance though, nothing much has changed: the six HKEYs are still there,
along with the same old subkeys found in Windows 95. But it takes only a
few minutes to discover that although much of the old stuff is still
there, there's a lot that's new too. I've covered much of it in my new
book The
Windows 98 Registry: A Survival Guide for Users. I went through
the book with my editing chain saw and hacked off the following bits and
pieces to describe various customization techniques which require a bit
of Registry editing. With any kind of luck, it won't be nearly enough to
satisfy your curiosity.
Among its other bells and whistles, Internet Explorer 4 makes
significant changes to the Windows Explorer. For example, open the View
menu, select Folder options and click on the View tab to see the new
Advanced settings section with a series of checkboxes and a trio of
radio buttons. But some things never change, like Microsoft's
traditional style of inconsistency: some boxes must be checked to enable
a feature, while others must be cleared to do the same thing. Of the
radio buttons, two are marked “Do not show … ” while the third is
“Show … .” And by default, three boxes in the Files and Folders
section are checked, four are cleared.
Tweak Viewy?
Fortunately for those who still believe that “digital logic” is
not an oxymoron, this mess can be cleaned up with a few edits because
each View tab option is now written into its own Registry subkey,
which—up to a point—can be customized or even removed. For a
customization example, note that five checkboxes in the Files and
Folders section must be checked to enable an option (“Show …, Allow
…, Remember …”) and one (“Hide …”) must be checked to disable
an option. To bring a little consistency to the list, drill down to the
following Registry key:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Advanced\Folder\HideFileExt
In this key's Contents pane, the Text entry is “Hide file
extensions for known file types” and other entries show that a checked
box (CheckedValue) is equivalent to 1, a cleared box (UncheckedValue) is
0, and by default the box is checked (DefaultValue = 1). In other words,
there's a check in the “Hide file extensions…” box. To bring this
option into agreement with the others in this section, just change the
Text line to read “Show extensions for all known file types.” But
since the former “Hide…” is now “Show…,” the CheckedValue
and UncheckedValue entries must also be swapped so that the checkbox
status agrees with the revised text. As for the DefaultValue entry, it
simply indicates the Checkbox status when the “Restore Defaults”
button is clicked, so a customized default set can be configured by
editing it here and in the other subkeys in this section. Just work out
your own preferred default configuration, then edit each DefaultValue
entry accordingly, and you can restore that configuration at the click
of a button.
The text next to each radio button in the “Hidden files” section
can be revised by editing the Text entry in each of the following
subkeys:
Subkey |
Change this Text entry: |
to this: |
Hidden\ … |
Hidden files |
Show these file types: |
NOHIDDEN |
Do not show hidden files |
All, except hidden |
NOHIDORSYS |
Do not show hidden or system files |
All, except hidden & system |
SHOWALL |
Show all files |
All |
No further edits are required since these revisions don't change the
status of any button—they simply describe in fewer words what each one
actually does. Similar edits might be made to other keys in this section
to customize the entire list as desired.
After you configure the two Advanced settings sections as desired,
it's quite easy to prevent others from making changes. Just export the
Advanced key structure (for safe-keeping), and then delete it. You can
do this because this key structure simply determines the appearance of
the Advanced settings options; the actual configuration settings are
written into entries elsewhere in the Registry.
Before
and After: A few Registry edits make the options on the Advanced
Settings list a bit easiler to follow. Note the consistency in the
language and check boxes in the “After” shot on the right.
Some Sage Extension Advice
Speaking of the options to hide or show all extensions, sooner or
later many users select the latter option because it makes it easy to
distinguish different file types that share a common name (for example,
SAGE.DLL, SAGE.EXE, SAGE.VXD). But even if you prefer to show most
extensions, it's still convenient to hide some of them. For example, if
a folder is dedicated to word processor documents, while others store
spreadsheets or bitmaps, you don't need to be reminded of the extension
for each and every file in such folders. To kill such extensions, first
open the HKEY_CLASSES_ROOT key, highlight the subkey with the extension
name you wish to conceal and note the filetype listed in the Contents
pane's (Default) entry. For example, the .bmp subkey shows Paint.Picture
on this line, so find the subkey with that name and add the following
new string value:
Name |
Data |
NeverShowExt |
"" |
Although no Data value is needed, the presence of this entry is
enough to hide all occurrences of the BMP extension. Follow the same
general procedure for your word processor and spread-sheet file types to
hide their extensions too.
Explorer Window Icons
Sooner or later everyone decides that the Windows selection of icons
could use a little improvement, and one of the earliest tricks was to
retire the default icon that appears next to each bitmap file, as
specified by the HKCR\Paint.Picture\DefaultIcon subkey entry
shown in the first line below:
Name |
Data |
(Default) |
"C:\Program Files\Accessories\MSPAINT.EXE,1" |
(Default) |
"%1"
(note two quotation marks on either side of the %1) |
If the Data entry is re-written as shown in the second line, each
bitmap file displays its own distinctive icon, which is a thumbnail
version of the actual bitmap image. In making the edit in the Value data
box, include a quotation mark on either side of the %1 parameter, so
that it will be enclosed in two sets as shown above. This is so that the
replaceable %1 parameter will recognize a long filename with a space in
it.
The option to view
thumbnail icons will come in handy if you keep all your bitmaps in
a dedicated folder and don't need to see the BMP extension after each
filename.
Since this option considerably slows down an Explorer window, make a
point of keeping all bitmap files in a separate C:\BITMAPS (or similar)
folder. That way Explorer won't be detained unless you specifically want
to view your bitmap collection. The bitmap display takes time because
Windows must create a distinctive icon for each such file on the fly. By
contrast, all CPL and many DLL files already contain at least one
embedded icon, which can be quickly displayed by a few more simple
Registry edits. Just locate either or both of the following Registry
keys and change the Data entry (which is usually the same for both file
types) as shown by the two lines below. In either case, replace the data
with the same “%1” entry shown in bitmap example above.
HKCR Subkey |
Name |
Data |
cplfile\DefaultIcon |
(Default) |
"C:\Windows\System\shell32.dll,-154" |
dllfile\DefaultIcon |
(Default) |
"C:\Windows\System\shell32.dll,-154" |
After making these edits, a search for all files with a CPL extension
produces a display not unlike a Control Panel applet window, except that
each icon title is the name of the file in which that icon is embedded.
There will of course be only one occurrence of each CPL file, while the
Control Panel itself may display two or more icons from the same CPL
file. A search for DLL files displays the first icon embedded in each
one, or the generic Windows document icon if the file does not contain
an icon.
A simple Registry edit is all it takes to persuade each CPL file to
display its own distinctive icon. This can be useful when trying to
identify a file with an obscure name, such as S32LUCP1.CPL (as
shown here). The same icon is identified in the Control Panel as
Symantec's LiveUpdate Manager.
Shorting some Shortcut Icons
TweakUI's Explorer tab makes it easy to change the Windows shortcut
overlay icon from the default small arrow into whatever you prefer,
including nothing at all. But once the novelty wears off, most users
reinstate the little visual cue that distinguishes a shortcut from
everything else on the desktop. However, a bit of creative cheating is
all that it takes to remove some shortcut overlays while leaving the
others in place. Here's how to do it.
You may have already noticed that if the shortcut arrow is disabled
via TweakUI, it still shows up in the corner of a URL icon, for the
simple reason that a file with a URL extension is an Internet
shortcut, controlled by its own Registry rules. Since there's little
likelihood of confusing this kind of shortcut with an actual
application, you can get rid of its shortcut overlay by opening the
Registry and drilling down to the following key:
HKEY_CLASSES_ROOT\InternetShortcut
Highlight the IsShortcut entry in the Name column and delete it. Now
scroll up to the .URL key, highlight it, open the Edit\New menu and
select the Key option. Name the new key ShellNew (one word), then use
Edit\New again to add a String Value named NullFile. The next time
Windows opens, all URL shortcuts will no longer display the little
shortcut arrow in the corner of the icon, and the New menu will display
an “Internet shortcut” option.
Now just because this option says it's an Internet shortcut, that
doesn't mean you can't use it for something else. For example, create a
new Internet Shortcut icon on the Desktop, then open its Context menu,
select Properties and type the following in the Target URL box:
C:\Progra~1\Access~1\MSPAINT.EXE
Windows gets confused if you write a path with spaces and long names
in the Target URL box (for example, "C:\Program Files\Accessories\MSPAINT.EXE")
and tries to set up an http link, so remember to use the “~1”
convention shown here. Then click the Apply button and Windows re-writes
the line as:
file:///C:/Progra~1/Access~1/MSPAINT.EXE
Now use the Change Icon button to select an icon from the MSPAINT.EXE
file, and you'll finally have an “Internet Shortcut” that really
isn't—instead, it's an arrow-less URL shortcut that launches the MS
Paint application already resident on your hard drive. Modify the
instructions above to create your own arrow-less shortcuts, as desired.
Fixing the Fonts List
Certain differences will be noted if the C:\Windows\Fonts folder is
examined in a DOS window and again in an Explorer window. For example,
although a DOS listing of hidden screen font files (DIR *.FON /AH)
usually shows 18 files, only five appear in the Explorer window, because
it shows only those FON and other files cited in the first
Registry key listed here:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Fonts
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\fontsize\xxx\User
The first key lists TrueType fonts, third-party FON files (if any),
but only the five FON files also found in the second key listed above,
where xxx is either 120 or 96. The fonts cited in
the 120 key are displayed if the system is configured for large
fonts, while those in the 96 key are seen if configured for small
fonts. Fonts listed in the other numbered key, and in both of the
equivalent Systemsubkeys, are not displayed in the Explorer
window, even though present in the fonts folder.
If the name of any such “missing” file is added to the HKLM\…\Fonts
list, it will be seen the next time the fonts folder is opened in an
Explorer window. To do so, add one or more new lines such as those shown
here:
Name |
Data |
8514-System |
8514sys.fon |
DOS applications |
dosapps.fon |
Make sure the Name entry is suitably descriptive and does not
duplicate an existing entry. After restarting Windows, the font will be
listed in the Explorer window. Or, to see a complete list of all FON
files in the C:\Windows\fonts folder without editing the Registry,
simply use the Windows Find option to search for files named *.FON. In
either case, double-click on the file icon to display its contents.
Network Connections
If a network drive was mapped to a local drive letter, and the
“Reconnect at logon” box checked when that letter was assigned, then
Windows will expect to find that network drive every time it starts. If
it is not available, a “connection not available” or “share name
not found” message appears, along with a yes/no prompt to try again
next time. If you click the No button, the connection record will be
deleted from the Registry. If this is a recurring problem because
various network drives are frequently unavailable, yet the same set of
drive mappings are regularly needed when they are available,
setup the desired mappings and then export the HKCU\Network\Persistentkey
structure. Create a shortcut to it on the Desktop or in some other
convenient location, and use that shortcut as required to restore lost
drive mappings that become available again after Windows has opened.
|