'; window.popUpWin.document.write(zhtm); window.popUpWin.document.close(); // Johnny Jackson 4/28/98 } //--> Windows 98 Professional Reference -- Ch 9 -- Hardware Profiles


Windows 98 Professional Reference

Previous chapterNext chapterContents


- 9 -
Hardware Profiles



Under Windows 3.x there was no easy way to handle computers that had their hardware configurations changed regularly. These configuration changes might occur with notebook computers that dock and undock or desktop computers that have frequent device changes (such as if you frequently connect and disconnect a parallel port-based CD-ROM device). The only way to handle these situations was to have alternate sets of *.INI, CONFIG.SYS, and AUTOEXEC.BAT files, and then use batch files to swap the versions of these configuration files around before you switched to the new hardware configuration and restarted. Certainly, this was an ugly and inefficient way to manage this requirement!

To solve this problem, Windows 95 added support for Hardware Profiles, which let you store frequently used hardware settings in different profiles. You then select from a list of possible Hardware Profiles when the system is started. For example, you might have two profiles for a notebook computer, one for when it is undocked, and another for when it is docked. At boot time, you can select which of these profiles to use for the session.


NOTE: A Hardware Profile is simply a collection of settings defining what hardware is installed in the computer, and how that hardware is configured.


You should note that Hardware Profiles typically do not need to be used with computers that are fully Plug and Play-compliant, as long as the devices being activated and deactivated are also Plug and Play-compliant, because the Plug and Play (PnP) software will automatically manage shifting hardware in the system in this case. However, because there are still many hardware devices in use that are not PnP-compliant and computers that poorly implement PnP, familiarity with Hardware Profiles is required, even with newer computers and Win- dows 98.

Hardware Profile Boot Process

When a Windows 98 computer is started, the operating system scans the computer for new or changed devices that it can detect. If it can determine exactly which hardware profile is needed, it automatically uses it. If it can match up the computer configuration with a defined hardware profile, it automatically uses the matching profile. If it finds more than one hardware profile that suits the hardware it senses installed in the computer, it automatically prompts you during boot to determine which of those profiles it should use.

Creating New Hardware Profiles

You cannot create a new hardware profile "from scratch." Rather, you copy the initial hardware profile for the system, after which you can modify the new copy. To do this, follow these conceptual steps:

1. Copy the Original Configuration hardware profile to a new profile.
2. Boot the computer, selecting the new profile during the boot.
3. Make changes in Device Manager to modify the new hardware profile's settings.

To modify a hardware profile, first boot the system using that profile. You can then make changes by deleting devices in Device Manager, by disabling devices through a checkbox on the device's Properties dialog box, or by adding or changing the configuration of device drivers as necessary.

To copy and activate a new profile, follow these steps:

1. Open the System control panel object from within the Control Panel.

TIP: A quick way to open the System control panel is to right-click on My Computer, and then choose Properties.


2. Move to the Hardware Profiles tab, shown in Figure 9.1.
3. Select the hardware profile that you want to copy. Typically, you will see only the Original Configuration profile if you've not yet modified the Hardware Profiles on a particular machine.
4. Click the Copy button, which displays the Copy Profile dialog box shown in Figure 9.2.
5. Type a name for the new profile and click OK.

Figure 9.1

The Hardware Profiles tab of the System Properties control panel.


Figure 9.2

The Copy Profile dialog box.

After copying the base hardware profile, you must activate it so that you can modify it. Restart the system to do this. When the system boots, it will automatically prompt you (in a text message before the Windows 98 desktop appears) to choose which profile you want to use. Select the new profile and let the system finish booting.

After the system starts with the new hardware profile, you can make changes to the Windows 98 hardware configuration settings, typically using the Device Manager tab of the System Properties control panel. Any changes you make are automatically stored with no special action required on your part.


NOTE: How do you know which hardware profile is the active one at any given time?
To learn which profile is activated, open the System Properties dialog box and move to the Hardware Profiles tab. The active profile is the one that's selected when you open the tab. You can also find out which one is active another way: Select each of the listed Hardware Profiles in turn. The active hardware profile is the one that does not let you choose the Delete button. The other Hardware Profiles offer you the choice of clicking Delete (it isn't grayed when these profiles are selected), so you know that they aren't active.


Setting Up Hardware Profiles: An Example

Say you have a dockable portable computer that you want to set up to use Hardware Profiles for when it is docked and undocked. When docked, the system has a CD-ROM drive, an Ethernet card, a normal keyboard and mouse, and a different display connected to it. When undocked, it has no CD-ROM drive or Ethernet card and uses the notebook's built-in keyboard, pointing device and display. To set up the Hardware Profiles for this example, follow these steps:

1. With the computer docked, start Windows 98 and copy the Original Configuration profile to a new profile. Call the new profile Undocked.
2. Restart the computer (still docked) and choose the Undocked profile when prompted during boot.
3. Open the System Properties control panel, move to the Device Manager tab, and open the device drivers for devices that are available only when the computer is docked, such as the CD-ROM drive and the Ethernet card. On the Properties page for each device, click the checkbox Disable in This Hardware Profile. Also, change the drivers for the mouse, keyboard, and display. The goal is to change the settings in Device Manager to match the configuration of the system when it's undocked.
When you remove a device in Device Manager and you have multiple Hardware Profiles available, you are prompted for the profile from which you should remove the device. When you choose a device and click the Remove button, you will see the Confirm Device Removal dialog box shown in Figure 9.3. Make sure that the correct profile is selected in this dialog box before confirming the removal.

Figure 9.3

The Confirm Device Removal dialog box.



NOTE: Changing the settings in Device Manager won't affect the current session with Windows 98. For instance, deleting the driver for a CD-ROM player while in Device Manager won't make the CD-ROM suddenly stop working. Settings in Device Manager are applied only when the system starts using the selected hardware profile.


4. Shut down the system and undock it. Then restart the system and choose the Undocked profile again during startup.
5. As a wise practice, after the system boots with the new profile and the new hardware configuration (undocked), you should run Add/Remove Hardware from the Control Panel to ensure that Windows 98 has detected all available hardware devices in the alternate configuration.

Assuming that all of your changes in Device Manager truly match the configuration of the notebook computer in its undocked state, you've completed setting up its Hardware Profiles. The user can now simply boot the system and Windows 98 should properly detect and automatically choose the correct hardware profile. If for some reason it doesn't do so, the user can still simply choose from the hardware profile menu when booting the system.


NOTE: If you make mistakes in Device Manager such that the system won't boot with that profile whether it's docked or undocked, don't panic! Simply restart the system (docked) with the Original Configuration hardware profile, delete the bad profile, copy a new one from Original Configuration, and start over again.


Understanding Hardware Profiles and the Registry

The settings for each hardware profile are stored in the Windows 98 Registry. While you should never have to make Registry settings that affect Hardware Profiles, you should understand where in the Registry this information is kept. As a Windows 98 support professional, you must understand the structure of the Registry.

You can find the settings for the active profile in the key HKEY_CURRENT_CONFIG, where all of the subfolders represent different categories of settings for the current hardware profile. The settings in the HKEY_CURRENT_CONFIG key are copied from the complete set of hardware profile Registry settings when a profile is selected during boot.

You can find the settings for all of the Hardware Profiles, including the current profile, in the key HKEY_LOCAL_MACHINE\Config\hardware_profile_number. The hardware_profile_number corresponds to the order in which the Hardware Profiles were created.

You may not remember (or know) the order in which the Hardware Profiles were created, so you need a way to determine which Hardware Profiles the hardware_profile_key numbers correspond to. The "master key" in the Registry that shows you this information (the number and name of each hardware profile, as well as which one is currently active) is found in the following key (also shown in Figure 9.4):

HKEY_LOCAL_MACHINE\System\CurrentControlSet\control\IDConfigDB


Figure 9.4

The Registry key that shows you the names and numbers of all available Hardware Profiles.

Common Problems and Solutions

Managing Hardware Profiles is not really a very difficult task after you understand how profiles work and how to work with them. Most problems associated with Hardware Profiles result from configuration changes in Device Manager. These problems are actually hardware configuration problems; they are not necessarily problems with Hardware Profiles. For more information about hardware configuration in Windows 98, see Chapter 12, "Supporting Devices."

You should remember to avoid any modification of the Original Configuration hardware profile, and instead make changes to alternate Hardware Profiles as needed. That way, you can always return to the Original Configuration hardware profile if something goes awry. You can also often boot a particular hardware profile in Safe Mode and correct any Device Manager settings that are incorrect before trying to re-create the alternate hardware profile from scratch.

Backing Up the Original Hardware Profile

There are no tools for backing up and restoring Hardware Profiles in Windows 98, but you can use the Registry Editor for this job. To back up the Original Configuration hardware profile, follow these steps:

1. Open the Registry Editor (from the Start menu, choose Run and then type REGEDIT and click OK).
2. Select the key HKEY_LOCAL_MACHINE\Config\001. The 001 profile is always the Original Configuration hardware profile.
3. Access the Registry menu and choose Export Registry File. In the Export Registry File dialog box that appears, choose a name for the exported Registry fragment (possibly a filename on a disk), and make sure that the Selected Branch button is selected, showing the key name listed in step 2. Click OK to save the selected Registry fragment.

If something should happen to the Original Configuration Registry settings, you can use the Import Registry File command in the Registry Editor to reload the Registry fragment, restoring the settings to the Original Configuration hardware profile in the process. Obviously, it is important that the installed hardware on the computer exactly match the configuration when you initially created the Registry fragment by using this method.

Unknown Monitor Errors

When you boot a Windows 98 system for the first time by using a new hardware profile, you see a message during system boot telling you that new hardware (a display) has been detected and that the drivers are being loaded for the new hardware. This message is not a cause for concern. When you copy a hardware profile, the monitor settings are not copied along with all of the other hardware configuration choices, and so Windows 98 must determine the connected monitor type the first time you use a new hardware profile.

Conclusion

In this chapter you learned how Hardware Profiles work, where they are stored, and how to use them to manage frequently changing hardware configurations on a Windows 98-based computer. By using this knowledge, you can support and solve problems relating to the use of Hardware Profiles.

Chapter 10, "Mastering the Windows 98 Registry," concludes this section about configuring Windows 98 and provides a thorough look at the Windows 98 Registry, the "mother lode" of configuration databases for Windows 98. While managing the Registry can be tricky at times and often looks very complex, you will learn in the next chapter that it really isn't as difficult as it might appear. Mastering the Registry in Windows 98 enables you to really understand and master the configuration of Windows 98.


Previous chapterNext chapterContents

Copyright, Macmillan Computer Publishing. All rights reserved.