Build Your Skills: What you need to know about hardware profiles in NT

Get an overview of hardware profiles in Windows NT and a few ways to use them

That Microsoft NT 4.0 Workstation has the ability to create hardware profiles is a lesser-known fact to many people who use the OS. I expect this is because Windows NT is less often deployed on laptops than Windows 98. Hardware profiles are essential on laptops because they help eliminate hardware conflicts. For example, users can switch between docked and undocked settings. The docked profile will use a network connection and a large monitor, while the undocked profile will disable these devices and enable the laptop’s LCD screen and modem.

I’ve also used hardware profiles to experiment with power-saving settings and as tuning and troubleshooting tools. For several reasons, setting up these profiles on Windows NT is harder than on Windows 98. For one thing, NT doesn’t have a handy, comprehensive Device Manager to use. Profile settings are distributed between three Control Panel applets: System, Services, and Devices. In addition, NT services and devices have dependencies that can cause problems when one is disabled. These “uh ohs” become apparent when you disable a service and NT fails to start, or it starts with some bizarre behavior, such as failing to initialize the mouse. Having a safe hardware profile lets me always go back to something that I know worked before.

As you can see, it’s valuable to learn about hardware profiles. In this Daily Drill Down, I’ll give an overview of hardware profiles in Windows NT and suggest a few ways to use them.

What is a hardware profile?
If you had to write a profile of an employee—let’s say for the IT employee of the year award—you’d probably list that person’s essential characteristics. Similarly, a hardware profile is a list of hardware and software characteristics essential to running Windows NT. The profile will determine how Windows NT works with devices and services. For example, in one hardware profile you might disable the alerter service and a networking card. In another, you might disable a modem.

Of devices and services
Just in case you’re not familiar with the terminology, a device is any piece of hardware used by the operating system. For instance, any card that plugs into a slot (such as a video card, modem, or network interface card) or any standard peripheral that plugs into a port or a card (such as a hard drive, CD-ROM, monitor, printer, or keyboard) is a device. However, when you speak of a device being registered by Windows NT, you’re really speaking of a device driver. The driver is the software that tells Windows NT how to use the device, and typically has a file extension of .sys or .drv. Finally, when you disable a driver, you’re not breaking it or injuring it in any way (although that is one common way to disable hardware). You’re simply telling Windows NT not to load the driver. No device driver means no device. The list of devices shown by Control Panel’s Devices applet equals the device drivers that are registered with Windows NT in the registry, whether the OS uses them or not. You can view a typical listing in Figure A. Note the second and third columns, marked Status and Startup. You’ll see that most drivers available are not started; in fact, they’re disabled.

Figure A
The Devices list shows what device drivers are registered in Windows NT, their status, and their startup parameters, which can be Disabled, Boot, Manual, System, or Automatic.

A service, on the other hand, is a program that can run in Windows NT before a user logs in and expands the capabilities of the Windows NT operating system. Most of the time, you start a program after login (for example, starting Microsoft Word or Outlook), or you set one to start during login (for example, by placing Norton AntiVirus in the Startup folder). But services are part of the NT startup process, and they run whether someone logs into the computer or not. Many of these services are integral to NT’s operation. For example, the Workstation service lets you connect to shared network resources, such as printers and files. Later in this Daily Drill Down, I'll explain where in Windows NT you can find a list of default services.

You can view services, their status, and startup settings from the Services applet by double-clicking its icon in Control Panel, as shown in Figure B.

Figure B
The Services list shows registered services, their status, and startup parameters.

Hardware profiles, startup, and the registry
Since devices and services start before users log in, it follows that hardware profiles are loaded before login. Once you’ve created more than one profile, a menu of choices appears during startup, the step before the NT Kernel is initialized. (The Kernel is initializing when the screen turns blue and the little dots start marching across it.) In terms of the registry, all the registry settings that go along with hardware profiles are stored in HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Hardware Profiles\####. The number signs represent a four-digit number. For instance, the settings for the first hardware profile to appear on the Hardware Profile tab in the System applet would be called …\Hardware Profiles\0001, and so on. There is also an entry called Current, which contains the hardware profile being used at that time. When Windows NT boots, the values stored in the hardware profile the user selects are copied into their appropriate places in the registry. This is a rough outline of what happens under the hood when you choose a hardware profile.

When NT is first set up, it creates a default hardware profile called Original Configuration. You can see this by going to Control Panel, double-clicking System, and choosing the Hardware Profiles tab. Figure C shows the Hardware Profiles tab after Windows NT is installed.

Figure C
At first, the Hardware Profiles tab displays the default hardware profile, called Original Configuration.

Windows NT devices will be initialized based solely on hardware profiles. Mismatches will disable those devices. In contrast, when you start up Windows 98 (and 95, and 2000), Plug and Play scans the hardware, verifying that the installed devices match the chosen hardware profile. If they don’t, the new devices are detected and installed (at least that’s the theory).

Creating hardware profiles
Since hardware profiles are global to all users of that workstation, only users with administrator rights can create them. As far as I know, you can create as many hardware profiles as you like. Creating a new hardware profile is easy. As in Windows 98, click Control Panel’s System icon and select the Hardware Profiles tab. Next, with a hardware profile selected, click the Copy button. In the next window, give your profile a name and click OK. At this point, you have two identical hardware profiles.

The next time you start Windows NT, both profiles will be displayed, similar to the screen shown in Figure D (Figure D isn’t a screen shot, but a recreation of part of the menu). By default, you have 30 seconds to choose a profile before Windows NT loads the one highlighted. Select one using the Up Arrow or Down Arrow key, or if Windows NT failed to start last time, select Last Known Good Configuration by pressing L. If you want to change the countdown time, after you log in, go back to the Hardware Profiles tab. You can also choose Wait Indefinitely For User Selection and change the order of your profiles using the up/down buttons on the right of this tab.

Figure D
With two or more hardware profiles, Windows NT asks you to make a choice.

Changing laptop and networking properties
Windows NT actually has more options on the Hardware Profiles tab than Windows 98. In Windows 98, you can only copy, rename, and delete profiles. To add or remove devices, you change their properties on the Device Manager tab. Windows NT, on the other hand, has some properties you can set on this tab. To view NT’s options, select a hardware profile and click Properties.

On the General tab in the properties dialog box for that profile, you can select the role of your computer. If appropriate, select This Is A Portable Computer, and specify whether the computer is docked, undocked, or the docking state is unknown, as shown in Figure E.

Figure E
The properties dialog box lets you choose the role of your computer.

On the Network tab there is one choice only. If you want, you can create a network-disabled hardware profile by selecting that option. For a computer that will never be connected to the network, or will be off the network sometimes, this is a good choice. This simple setting reduces the hassle of disabling such devices as network cards on the Devices tab. Users will still be able to dial in with their modem.

Although selecting this option reduces some hassle, a surprising message or two may still appear to confuse users. For instance, if your users choose a network-disabled dial-in profile and they have mapped networked drives, Windows NT will still try to restore them. Even though networking is disabled, the OS doesn’t know the difference. The warning dialog box will report An error occurred while reconnecting… followed by the network path. Users will need to know not to tell Windows to continue restoring connections, and they could become frustrated when encountering messages that slow them down. I suggest replacing mapped networked drives with a desktop shortcut to eliminate this warning.

Troubleshooting devices and services
Recently, when Windows NT booted up on my laptop, it reported that a driver or service didn’t start. I used hardware profiles to troubleshoot and test the fix for this error. The procedure is a good example of what to do in similar cases.

The first place to check for more detailed information is in Event Viewer. If you are new to NT, you may not be familiar with this troubleshooting application. Start Event Viewer by clicking its icon in Start | Programs | Administrative Tools (Common). The first choice on Event Viewer’s menu bar is Log. Clicking Log lets you view System, Security, and Application events. Set Event Viewer to show your system events.

In my case, Event Viewer reported that an adapter driver service called EL656 failed to start and that another service, called EL656 Serial Driver, was dependent on it and had also failed. I wasn’t familiar with either of these devices, and they didn’t appear on my list of default Windows NT services. I had a hazy memory that once I tried installing a PC card with 656 in the model number. If so, I no longer needed the device.

In a Windows 98 world, I’d probably remove it. However, most of the manuals on NT report that it’s difficult, if not impossible, to remove old, unused drivers or services from the system (for example, see the Microsoft TechNet article ”Windows NT and Hardware,” specifically the section on removing the old drivers). Instead of removing them, you have to disable them or change their startup properties. However, I wasn’t going to just irrationally disable a device or service without protecting the computer.

In a case like this, go to Control Panel’s System icon, select the Hardware Profiles tab, and copy your main profile. Call it something useful, like Test EL656 Disable. Click OK to exit. Now you’re ready to disable the problem software in a safe environment. If this causes big problems, you can reboot later into your other profile and continue troubleshooting.

Disabling devices and services
A nice feature of Windows NT hardware profiles is that, unlike with Windows 98, you don’t have to be in that profile to disable or enable its devices and services. In Windows 98, you can only disable the current profile, or all profiles. The key is a button called HW Profiles that appears in both the Devices and Services applets. First, select the driver or service you want to change, then click this button. The resulting dialog box lists the device or service as well as its status in each profile. Change the settings by clicking the Enable or Disable button.

To solve my system problem, I found the EL656 Adapter Driver in Devices, highlighted it, clicked the HW Profiles button, and disabled the driver only in the Test EL656 Disable profile, as shown in Figure F.

Figure F
No matter which hardware profile you’re logged into, you can enable or disable devices or services in any other profile.

Before making a change such as this on all the hardware profiles, log into the test profile and work with applications and with the network, looking for any signs of trouble. If it looks as though your change was nothing but good news, make it permanent. Go back into Devices, but instead of clicking HW Profiles, click the Startup button and change the Startup Type to Disabled. Entries made here affect every hardware profile. When you’ve finished with the test profile, delete it. That’s how I handled the EL656 mystery driver.

Another problem I had was with a superfluous service. Event Viewer informed me that NetLogon, a service used to authenticate logging on to a domain, wasn’t needed, because the computer was currently networked as a workgroup rather than a domain. To speed up booting, I used the Services HW Profiles button to disable it. After testing the new configuration for problems, I changed the Startup setting to Manual rather than Automatic.

Cryptic drivers and services
One thing that interferes with troubleshooting is the cryptic nature of device and service names. For example, how would you ever guess that Sparrow.sys is the name of the Adaptec SCSI driver? To help you out, visit the Driver list from the Driver Files document at Microsoft’s MSDN online library. A list of default services is available in the NT 4.0 help files. Press Start | Help and type default services in the index to view the topic. Happy troubleshooting!

Mike Jackman is an editor in chief of TechProGuild, an editor of PC Troubleshooter and Windows Support Professional, and also works as a freelance Web designer and consultant. In his spare time (when he can find some), Mike’s an avid devourer and writer of science fiction, parent to two perpetually adolescent cats, and a hiking enthusiast.

The authors and editors have taken care in preparation of the content contained herein, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for any damages. Always have a verified backup before making any changes.

Editor's Picks