TOCBACKFORWARD

Troubleshooting and Configuring
the Windows NT/95 Registry

-26-

Troubleshooting and Configuring User Registry Settings

If no one ever touched computers after they were set up, they would probably never fail. Then again, not much work would get done. That user component makes the computer work, but it can also cause problems. Some of the changes users make are accidental, and occasionally, some are malicious. Most of the time the changes are based on doing things the users think will be beneficial, and then they find out later that there are side effects that no one warned them about.

Even though there are many settings for users in the Registry, not many of them are so critical to the workings of the system that you cannot keep the system going. Most of the changes that you need to make are based on preferences.

User settings are in separate files from the rest of the Registry. In Windows 95, the settings are stored in C:\Windows\USER.DAT if User Profiles are not set up. If they are, the user settings will be unique for every user who logs onto the machine, and each will have a USER.DAT file in C:\Windows\Profiles\username.

Setting User Preferences in the Registry

Most user settings are done through the Control Panel on a local system, and they focus on the Display and Sounds applets. The other settings nearly always come down to hardware, drivers, and applications. The display settings for both Windows 95 and Windows NT are in the HKEY_CURRENT_USER\Control Panel\Desktop and the HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics keys. You would seldom need to edit the Registry directly, because the Control Panel gives you much more flexibility than in Windows 3.x.

Sound functions for both 95 and NT are in the HKEY_CURRENT_USER\Control Panel\Sound and HKEY_CURRENT_USER\Control Panel\Sounds keys. The Sound key controls some of the device options specific to users, and the Sounds key lists the settings for the sounds. The other place where sounds are specified are in the HKEY_CURRENT_USER\Software\Microsoft\Plus!\Themes.

One of the locations that has made the most improvement from Windows 3.x and Windows NT 3.51 to the present interface is the Appearance tab in the Display applet in the Control Panel. In prior versions, it was necessary to make most of the interface appearance changes in the .INI files or in the Registry. Now you can do it with a graphic interface, both speeding up the process but also making it more reliable.

If there is a problem with user functions, they can nearly always be fixed through the conventional methods of Control Panel and User Manager for Domains (in Windows NT). The few options that lie outside the included applications require Registry changes.


SOLUTIONS: I used the NameNumericTail value, and now I can't find Exchange. What did I do wrong? The side effect of using NameNumericTail is that some programs may not be able to find all of their parts and pieces and will give your errors. Windows 95 actually stores the filenames in 8.3 format, with the long filename as a comment. Some applications look for only the long filename, others only the short names. The problem usually happens only when you use the Program Files location for your applications. If you install your applications in another location, it usually doesn't create a problem. The short name for Program Files is normally Progra~1. With NameNumericTail turned off, the name would be Programf. If the application looks only for Progra~1, then NameNumericTail will not work for you. NameNumericTail is in the Hkey_Local_Machine\System\CurrentControlSet\
Control\FileSystem
key. If your application doesn't work now, you will need to disable or delete NameNumericTail, and fix the Program Files folder. Rename the Program files folder to any name (such as "test"), and then rename it back to Program Files. That will restore the original Progra~1 short filename for it.

Changing the way that Windows works may have alternative consequences that you didn't foresee. Be careful in making changes to too many systems at once. If the change becomes a problem, then you will have a great number of changes to make.


SOLUTIONS: I had shortcuts built into my SendTo folder in Windows 95. When I changed to User Profiles, all I get is the one for all users. If I change it, then all users would get the changes, and I don't want that to happen. How can I get my own SendTo folder again?
1. Create a SendTo folder in each user's personal folder.

2. Edit the Registry for each user to change the SENDTO value to point to the SendTo folder you created for each user. The key is HKEY_USERS\username\
SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\
Shell Folders
.

3. Add a SENDTO string in the HKEY_USERS\username\SOFTWARE\Microsoft\
Windows\CurrentVersion\Explorer\User Shell Folders
, and then have it also point to the SendTo folder you created for each user.

4. Add any shortcuts you would like to that folder.

It isn't particularly difficult; it will just take a little extra time.


Sometimes, it would be nice to get to do what you want with the Explorer interface. Unfortunately, Microsoft has embedded the settings into the Registry that would be nice to change.


SOLUTIONS: When I double-click on My Computer, I want it to launch Explorer instead. How can I make it do that? You will need to change your Registry. The function of My Computer, and all of the other icons on the desktop, is controlled by the Registry. In either Windows 95 or Windows NT, you would do the following:
1. Open HKEY_CLASSES_ROOT\CLSID\20D04FE0-3AEA-1069-A2D8-08002B30309D\Shell.

2. Add a new key called Open.

3. In the Open key, add a new key called Command.

4. Add a value to the Command key as a regular string value, with no name.

5. As the string, enter Explorer.exe.

The next time you double-click My Computer, it will launch Explorer, and not My Computer. If you want to make the system use My Computer again, take out the two
values listed.


Explorer gives you tremendous options to work within your systems. However, it has some quirks and some characteristics that annoy many people.


SOLUTIONS: Whenever I create a new file or folder and Explorer is open, I need to either go to the end of the list of the contents to see it, or I have to press F5 to refresh. Is there a way to automatically refresh the contents of my folders? A simple Registry change will make it happen. Open HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Update. Edit the UpdateMode value, and change it to 0 in Windows NT or 00 in
Windows 95. The next time you make changes in Explorer, they will be immediate.

In Explorer, all of the icons show the applications with which they are associated. It makes it easy to differentiate different types of files, even without extensions. Some flexibility would be nice.


SOLUTIONS: How can I make the icons in Explorer for the .BMP files show a thumbnail of the file, instead of the Paint file icon? You can change the Registry to change how the system shows icons.
1. In either 95 or NT 4.0, open HKEY_CLASSES_ROOT\Paint.Picture\
DefaultIcon
.

2. Edit the default value, and change it to %1.

3. Choosing Large icon in the View menu will make them easier to read.

I am not exactly sure why Microsoft didn't make the bitmap thumbnail the default, except that on an 800x600 or higher resolution, anything other than large icons is almost impossible to read.


SOLUTIONS: I removed some programs from my system, but their names still show up in the Add/Remove Programs list in Control Panel. Do I have to reinstall them, and then remove them again in order for it to remove them from the list? No. You can edit the Registry and take them out of the list. The list is actually several keys under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\
CurrentVersion\Uninstall
. If you remove the key, you cannot use the Add/Remove Programs to uninstall the applications. I would only recommend this if, for some reason, it left the item there. Don't assume that this solution will protect you against people uninstalling applications because the application
isn't there. If uninstallation is not done through Control Panel, it could
cause serious damage to the system by deleting files that are in use by other programs. This solution is exactly the same for Windows 95 and Windows NT 4.0.

Removing entries in the Registry is a little risky. You should always make a backup of the Registry before proceeding.


SOLUTIONS: In Internet Explorer, when I download things from the Internet, it asks whether I should save the .EXE file to disk or if it should just run it. There is also a selection for it not to ask me again. I told it to open the file, and never to ask me again, but I have changed my mind. How do I get the dialog box back? The setting is in HKEY_CLASSES_ROOT\Exefile for either Windows NT or Windows 95. Change the EditFlags value from d8 07 01 00 (don't ask any more) to d8 07 00 00 (ask every time). Figure 26.1 shows the dialog box.

Figure 26.1. Choosing how Internet Explorer will handle downloaded files.

Some of what you do on the Desktop is based on the Registry, and some is based on the User Profile. The next Solution is part of the Registry, whereas changing the Send To options is part of the User Profile.


SOLUTIONS: The context-sensitive menu that opens when I right-click on the Desktop or in Explorer and select New is becoming very long. I hardly ever use those functions, and I would like to get rid of them. How can I do that? HKEY_CLASSES_ROOT controls all the 32-bit applications in your system. During installation, many applications add to the New menu by changing the Registry. If you don't want items in the New menu, you will need to do a little surgery on the Registry yourself. If there is an association between a file type and an application, the Registry shows a plus sign in the folder next to the extension. Figure 26.2 shows the Registry folders indicating an association to a file type.

Figure 26.2. The .PPT file has an application (PowerPoint 8) associated with it.


Figure 26.3 shows the New menu with an option to create a new Microsoft PowerPoint Presentation.

Figure 26.3. The New menu with options to create new documents and files.


If you remove the subkeys from the key that has the plus sign in it, you will remove the automatic launching of a file (when you double-click on it), and it will remove the option to create a new file from the New menu, as seen in Figure 26.4.

Figure 26.4. The New menu will no longer create a PowerPoint Presentation file.


It is a little bit more complex to re-create this item in the menu, so be careful not to take out something you would like to retain.


DOS applications usually show only 25 lines of text. Inside Windows NT and 95, you can easily change that with a menu option. Others aren't so nicely done.


SOLUTIONS: I want to see more lines in my Telnet session than it lets me. I also want to set it so I can see more than the 25 lines above the one I am using when I scroll up. How can I make the change? The Telnet scroll-back buffer controls the size, and it is set to 25 lines. You need to change that, and you can set it for as many lines as you would like. Open the Registry, and edit the HKEY_CURRENT_USER\Software\Microsoft\
Telnet
key. Edit the Rows value, and change it from the default of 25 to as many lines as you would like.

Summary

With the changes described in this chapter, you can make your system respond the way you expect it to. If you are careful and use wisdom, you can take back your desktop, and make it respond the way you want it to.

TOCBACKFORWARD

© Copyright, Macmillan Computer Publishing. All rights reserved.