Yahoo

 

Home

Journal Contents List

Next - Article Number 3

 

Internal Links

 

THE WINDOWS REGISTRY
PART 5

by Brian Grainger: email.gif (183 bytes)brian@grainger1.freeserve.co.uk


 

This article will be published in the ICPUGSE Newsletter Number 112
Have a look at the ICPUGSE web pages for details on how to join ICPUGSE

 INTRODUCTION

In this last part of the series I want to briefly discuss the HKEY_DYN_DATA keys, revisit some open questions from the previous parts and introduce some more Registry tweaks to personalise your Windows.

STRUCTURE OF HKEY_DYN_DATA

As the last part of the name of this key indicates this section of the Registry holds dynamic data. This configuration information is stored in RAM because it requires fast modification and retrieval that cannot wait for the Registry to flush to the hard disk. The data in this section is rebuilt every time Windows is loaded. During the startup process Windows checks the hardware that is in the system on all the internal buses. This is called bus enumeration. It will also provide configuration data for the hardware, such as assign IRQs. This is at the heart of Plug and Play where IRQs and the like do not have to be explicitly assigned. All this hardware and configuration data is stored in RAM and in the HKEY_DYN_DATA section of the Registry. With Plug and Play devices can be removed and added during operation, so this data is updated on the fly.

HKEY_DYN_DATA contains two subkeys as detailed below.

Config Manager

This subkey and its contents, also called the hardware tree, is a record of the current system configuration. The information is drawn from the devices currently installed and loaded, and those that failed to load. The hardware tree is created every time the system starts and updates whenever a change occurs to the system configuration. Each device that is enumerated is given its own subkey and this will appear under the Enum subkey under Config Manager.

A device subkey, named with an 8 digit alphanumeric code, will contain 7 data values as follows:

  • Allocation
  • Child
  • HardwareKey
  • Parent
  • Problem
  • Sibling
  • Status

The HardwareKey identifies the subkey path within H_KEY_LOCAL_MACHINE\Enum which stores static information for the device in question. All of the other data values are binary and difficult to interpret. Child, Parent and Sibling somehow indicate where in the overall hierarchy the device appears. Status refers to the devices current status and Problem is presumably an indication of a problem such as a device conflict.

The data that is held within the Config Manager subkey, together with that pointed at by HardwareKey data values, is accessed when the Device Manager is displayed from the System settings of the Control Panel.

PerfStats

This contains statistics gathered for various network components currently in use on the system. The data is split among 5 subkeys. StartSrv and StopSrv contain data values relating to the services that can be monitored by System Monitor. StartStat and StopStat contain data values relating to all the statistics that can be monitored by System Monitor. The final subkey, StatData, contains the current values of all the statistics that can be monitored.

It is unlikely that you would want to view this data directly from the registry. One would use System Monitor to perform the status monitoring.

THOSE UNANSWERED QUERIES

The Config Subkey of HKEY_LOCAL_MACHINE

In Part 3 I said that new hardware would cause a new configuration enumeration to be created on Windows startup. However, I pointed out that some hardware, scanner or modem for example, would not cause this action to take place. Reviewing the Windows startup process in the Windows 98 resource kit provides the answer. Enumeration only occurs for plug and play devices. Legacy devices have to be detected and this is not an automatic process on startup. Detection occurs when you run the 'Add New Hardware' wizard from Control Panel. This also explains why, when trying to resolve an incorrect driver problem, removal of the driver will not automatically force Windows to look for another one. If it is a legacy device then you must run the 'Add New Hardware' wizard.

The Hardware Subkey of HKEY_LOCAL_MACHINE

There is still no information in the Windows 98 Resource kit which indicates what this section of the registry is for.

The Subkeys within HKEY_LOCAL_MACHINE\Software\Classes\CLSID

As stated in Part 3 there are Class Definition subkeys within the Classes subkey. These contain keys for default icons and OLE commands. What I did not mention in Part 3, because I chose an example at random which did not contain it, there can also be a CLSID subkey for a Class Definition. If you look at the Class Definition subkey midfile you will see a CLSID subkey which contains a default value of :

{00022603-0000-0000-C000-000000000046}

CLSID stands for Class Identifier. The value of such a key represents the identity of an ActiveX object. This value will be found as a subkey within the following branch of the registry:

HKEY_LOCAL_MACHINE\Software\Classes\CLSID

The default value of the subkey is usually a description of the ActiveX class, in this case 'MIDI Sequence', and identifies the object associated with that CLSID number. The subkeys of the CLSID branch contains the Active X object properties.

I am not going into an explanation of the Active X object model here because I simply do not know anything about it! However, we now know what those mysterious long alphanumeric subkeys in the registry pertain to.

REGISTRY TWEAKS

In the following sections I am going to assume that the reader knows how to create subkeys, values and value data and knows how to edit these items. This is pretty well covered in the help file for the Registry Editor. In discussing the tweaks I will identify the subkey required to be accessed by its path name. The value will then be identified. If the subkey or value does not exist by default then the user must create it. I cannot identify whether a key or value will be there or not because, in some instances, it will depend on how Windows has been used.

I have NOT tested these tweaks although I am reasonably confident they are correct. I have obtained the details from the sources mentioned at the end of this article.

Friendly "Short" Names

One of the features of Windows 95 are the long file names. However, if you use Windows 3.x applications you will still see the short 8.3 filename. Thus a file with the name "1995 Income Tax Returns" would become something like "1995In~1.xls". It is possible to tweak the registry so that the short name would take the original long name as much as possible, without the '~1' unless absolutely necessary.

Subkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem

Binary Value: NameNumericTail
Data: 00

Icons from the actual bitmaps

You can make the icons for bitmap files to be the actual bitmap, rather than the 'paint pot over a sheet of paper' icon. When you edit the bitmap the icon will change as well. One caveat to this modification is that icons will be a little slower to display.

Subkey:
HKEY_CLASSES_ROOT\Paint.Picture\DefaultIcon

String Value: (Default)
Data: %1

Rename the Recycle Bin

Subkey:
HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}

String Value: (Default)
Data: <new name for recycle bin>

Change the Icons for the Recycle Bin

Subkey:
HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon

String Value: (Default)
Data: <file containing icon for empty recycle bin>,<No. of icon in file (starts at 0)>

String Value: Empty
Data: <file containing icon for empty recycle bin>,<No. of icon in file (starts at 0)>

String Value: Full
Data: <file containing icon for full recycle bin>,<No. of icon in file (starts at 0)>

MAKE SURE THE RECYCLE BIN IS EMPTY BEFORE YOU EDIT THE ICONS. THAT WAY, THERE WILL BE NO CONFUSION AS TO THE VALUE OF THE DEFAULT.

Change the Icon for the Inbox

Subkey:
HKEY_CLASSES_ROOT\CLSID\{00020d75-0000-0000-c000-000000000046}\DefaultIcon

String Value: (Default)
Data: <file containing icon for Inbox>,<No. of icon in file (starts at 0)>

Change the Icon for the Network Neighborhood

Subkey:
HKEY_CLASSES_ROOT\CLSID\{208d2c60-3aea-1069-a2d7-08002b30309d}\DefaultIcon

String Value: (Default)
Data: <file containing icon for Network Neighborhood>,<No. of icon in file (starts at 0)>

Change the Icon for My Computer

Subkey:
HKEY_CLASSES_ROOT\CLSID\{20d04fe0-3aea-1069-a2d8-08002b30309d}\DefaultIcon

String Value: (Default)
Data: <file containing icon for My Computer>,<No. of icon in file (starts at 0)>

Removing the Inbox icon from the Desktop (Windows 95 only)

Try right clicking the icon and select Delete. If the delete option is not available then remove the following key from the Registry:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\explorer\
Desktop\NameSpace\{00020d76-0000-0000-c000-000000000046}

Removing the Recycle Bin icon from the Desktop

Remove the following key from the Registry:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\explorer\
Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}

Hiding All Icons on the Desktop

The last two items are really only scratching the surface of what we really want. If we want Windows to look as we want it, rather than how Microsoft wants it to look, we have to have a completely blank desktop and start from scratch. This tweak will remove all the icons from the desktop, including the system generated ones such as My Computer and all shortcuts. It will leave a completely pristine screen with only the Start button, Taskbar and System Tray. In order to add your own customised look to the desktop you will need to run a program at startup to provide it.

I have devised this tweak myself from a more complicated approach suggested by Windows 95 Annoyances. It has been tested and works. All you have to do is add a new value as follows.

SubKey:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

Binary Value: NoDesktop
Data: 01

If you want to recover the desktop icons at any time reset the data value to 00 and reboot.

Disable the Documents Menu

The Documents menu off the Start button is one of those seemingly useful ideas which turn out to be useless. It is meant to provide a way of quickly accessing the last 15 items worked on. However you can very quickly find the menu gets cluttered with things you do not want again and the things you do want have disappeared. If you never use the recycle bin to recover inadvertently deleted files you can send items that would normally go to the document menu straight to the recycle bin and then delete them immediately. Here is how.

Right-click on the Recycle Bin on the Desktop, and select Properties from the menu.

Under the Global Tab, select 'Use one setting for all drives'.

Turn on the option labelled 'Do not move files to the recycle bin. Remove files immediately when deleted'.

Now make the following tweaks to the Registry.

Subkey:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

String Value: Recent
Data: c:\recycled

Subkey:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\
User Shell Folders

String Value: Recent
Data: c:\recycled

Clear Unwanted Entries from Add/Remove Programs

In 'Add/Remove Programs' in 'Control Panel', a list of installed applications is displayed for the purpose of easy removal. To remove an entry from the list without uninstalling the program remove the matching key underneath the following Registry subkey.

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall

Clear Unwanted Entries from the Start Menu's Run Command

Whenever you use the Start Menu's Run command to launch a program, that program is added to a history. To remove all the items from the 'Run' list delete all the values except (Default) in the following subkey:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU

Note that clearing the History in Internet Explorer has the same effect (much to my annoyance!).

Print Out a Directory Listing

Although there is no built-in way to print a directory listing there is a way to add this functionality to Windows95.

With a text editor type the following lines into a new file. Change the second line to your own taste regarding how the directory is sorted and which port the printer hangs off.

cd %1
dir /ogne >lpt1

Save the two-line file as c:\windows\command\printdir.bat

Find the file in Explorer, right click on it, and select 'Properties'.

Click on the Program tab, turn on the 'Close on Exit' option, choose 'Minimized' from the Run list and click OK.

Now add the following two subkeys to the Registry:

HKEY_CLASSES_ROOT\Directory\shell\Print
HKEY_CLASSES_ROOT\Directory\shell\Print\command

In the latter key set the following:

String Value: (Default)
Data: c:\windows\command\printdir.bat

Now whenever you want to print the contents of a folder simply right click on the folder (in Explorer) and select Print.

Turn Off "Zooming" Windows

If you don't like the zoom effects when windows are maximised or minimised create the following Registry key with appropriate setting.

Subkey:
HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics

String Value: MinAnimate
Data: 0 (turn off zooming windows)
         1 (turn on zooming windows)

CONCLUSION

We have come to the end of the journey through the Registry. I hope that this series has helped to demystify the subject and left you more confident in looking and playing with the Registry. It has given me the opportunity to read in detail the information on the registry I have collected since 1995 and I certainly understand more myself. When I have the time I will be looking further at the sample policy files that come with Windows 95/98. These are the .adm files that are supplied with the Policy Editor, poledit.exe, on the Windows CD-ROM. I feel that there are many new keys with their functions, like NoDesktop, to discover in these files.

In preparing this final part of the series I have used the following data sources and thanks are given to the individuals concerned in their preparation.

Windows 98 Resource Kit (initiated by Microsoft)
Windows95 Annoyances (initiated by a very smart person who is not named)
Windows 95 Registry FAQ (initiated by Kent Daniel Bentkowski)


What's New at ICPUG

Home

Back to Top

Next - Article Number 3

Journal Contents