Sie sind auf Seite 1von 9

Installing Device and Drivers

Step 1: The New Device is Identified Before a driver is installed for a new device, the bus or hub driver to which the device is connected assigns a hardware identifier (ID) to the device. Windows uses hardware IDs to find the closest match between a device and a driver package that contains the driver for the device. For more information about hardware IDs, see Device Identification Strings. The format of the hardware ID typically consists of the following:

A bus-specific prefix, such as PCI\ or USB\. Vendor-specific identifiers for the device, such as a vendor, model, and revision identifier. The format of these identifiers within the hardware ID is also specific to the bus driver.

An independent hardware vendor (IHV) can also define one or more compatible IDs for the device. Compatible IDs have the same format as hardware IDs; however, they are typically more generic than hardware IDs and do not require specific manufacturer or model information. Windows uses these identifiers to select a driver package for a device if the operating system cannot find a matching driver package for the device's hardware ID. IHVs specify one or more compatible IDs for the device within the driver package's INF file. Windows uses hardware IDs and compatible IDs to search for a driver package for the device. It finds a matching driver package for the device by comparing the device's hardware IDs and compatible IDs against those IDs that are specified within the package's INF file. For example, when a user plugs a wireless local area network (WLAN) adapter into the port of a USB hub that is attached to the computer, the following steps occur: 1. The device is detected by the USB hub driver. Based on information that it queries from the adapter, the hub driver creates a hardware ID for the device. For example, the USB hub driver could create a hardware ID of USB\VID_1234&PID_5678&REV_0001 for the WLAN adapter, where:
o o o

VID_1234 is the identifier of the vendor. PID_5678 is the product, or model, identifier of the device. REV_0001 is the revision identifier of the device.

For more information about the format of USB hardware IDs, see Identifiers for USB Devices. 2. The USB hub driver notifies the Plug and Play (PnP) manager that a new device was detected. The PnP manager queries the hub driver for all of the

device's hardware IDs. The hub driver can create multiple hardware IDs for the same device. 3. The PnP manager notifies Windows that a new device needs to be installed. As part of this notification, Windows is provided with the list of hardware IDs. 4. Windows starts a search for a driver package that matches one of the device's hardware IDs. If Windows cannot find a matching hardware ID, it searches for a driver package that has a matching compatible ID for the device. For more information about this process, see Step 2: A Driver for the Device is Selected. Step 2: A Driver for the Device is Selected After a new device is detected and identified, Windows and its device installation components follow these steps: 1. Windows searches for an appropriate driver package for the device. For more information about this step, see Searching for the Driver Package. 2. Windows selects the most appropriate driver for the device from one or more driver packages. For more information about this step, see Selecting the Driver. Searching for the Driver Package Using the hardware identifier (ID) that is reported by the bus or hub driver, Windows searches for driver packages that match a device. A driver package matches a device if the hardware ID matches a hardware ID or compatible ID in an INF Models section entry of the driver package's INF file. Depending on the operating system version, Windows searches for matching driver packages in various locations as described in the following table.

For example, if a user plugs a wireless local area network (WLAN) adapter into a port of a USB hub on a computer that is running Windows Vista, the following steps occur:

After the USB hub driver creates a list of hardware IDs for the WLAN adapter, Windows first searches the driver store for a matching driver package for the device. If a matching driver package is not found, Windows starts the Found New Hardware Wizard. The wizard prompts the user and displays an option to locate and install the driver software. If the user selects the option, the wizard searches for a matching driver package from one of the following locations: o The Universal Naming Convention (UNC) paths that are identified by the DevicePath registry value ofHKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentV ersion. o Windows Update o The distribution medium that the independent hardware vendor (IHV) provided for the device. If a driver package is found, Windows stages the package into the driver store from which the driver for the device will be installed.

Note Starting with Windows Vista, the operating system always installs a driver package from the driver store. If a matching driver package is found in another location, Windows first stages the package to the driver store before it installs the driver for the device. As another example, if a user plugs a WLAN adapter into a port of a USB hub on a computer that is running Windows 7, the following steps occur:

After the USB hub driver creates a hardware ID for the WLAN adapter, Windows first searches Windows Update for a matching driver package for the device. If a driver package is found, Windows stages it into the driver store from which the driver for the device will be installed. If a driver package is not found, Windows searches the driver store for a matching driver package for the device. Windows also searches for a matching driver package that was preloaded in the locations that are identified by the DevicePath registry value. If a driver package is found, Windows stages it into the driver store from which the driver for the device will be installed.

Note Starting with Windows 7, the operating system performs the search for matching driver packages without requiring user interaction.

For more information about the driver package search process, see Where Windows Searches for Drivers. Selecting the Driver As soon as Windows has found one or more matching driver packages for the device, Windows selects the best driver by following these steps: 1. If Windows has found only one matching driver package, it installs the driver from that package for the device. 2. If Windows has found multiple matching driver packages, Windows first assigns a ranking value to the driver from each driver package. If only one driver has the lowest rank value, it installs the driver from that package for the device. For more information about the ranking process, see How Windows Ranks Drivers. 3. If multiple drivers have the same lowest rank value, Windows uses the following criteria to select the best driver for the device: o Whether the driver is digitally signed. Starting with Windows Vista, Windows always selects a signed driver instead of an unsigned driver regardless of other selection criteria. For more information about digital signatures for drivers, see Driver Signing. o The driver date and version, where the date and version are specified by the INF DriverVer directive that is contained in the driver package's INF file. Once Windows has selected a driver for the device, Windows installs the driver as described in Step 3: The Driver for the Device is Installed Step 3: The Driver for the Device is Installed After Windows has selected the best driver for the new device, it saves information about the device and driver in the following way:

Multiple devices of the same model and version can be connected to the computer. Each device connection is known as a device instance. Windows represents each device instance as a unique device node (devnode). A devnode contains information about the device, such as whether the device was started and which drivers have registered for notification on the device.

Windows represents a driver for the device as a driver node. A driver node is based on the information from a matching device entry within the INF Models section of thedriver package's ?INF file. A driver node includes all the software support for a device, such as any services, devicespecific co-installers, and registry entries.

As soon as the device and driver are instantiated, Windows installs the driver by following these steps:

1. Based on directives within the driver package's?INF file, Windows does the
following: o Copies the driver binaries and other associated files to locations on the hard disk as specified by the INF CopyFiles directive. o Registers any device-specific co-installer as specified by the INF DDInstall.Coinstallers section. A co-installer is a Microsoft Win32 DLL that assists in device installation. A co-installer typically writes additional configuration information to the system registry, or performs other installation tasks that requires install-time information that cannot be handled by the INF file. In particular, a co-installer can provide finish-install wizard pages or (starting with Windows Vista) finish-install actions to do the following:

Obtain device parameters that are required for the device to operate. Prompt the user for permission to install device-specific applications. If permission is granted, the co-installer starts a device installation application that installs the software that the user runs to manage, configure, and operate the device. For more information about device installation applications and how they are started by a co-installer, see Writing a Device Installation Application.

For more information about device-specific co-installers, see Writing a Co-installer.

2. Windows determines the device setup class from


the Class and ClassGuid entries in the INF Version section of the driver package's ?INF file. To optimize device installation, devices that are set up and configured in the same manner are grouped into the same device setup class. The device setup class specifies the class installer and the class co-installers for the device, if any. If the device does not belong to the system-defined device setup classes, the vendor may need to create a new device setup class by providing a class installer in the driver package. For more information about class installers, see Writing a Class Installer.

3. As soon as the driver files are copied and any co-installers are registered,
Windows transfers control to the Plug and Play (PnP) manager. The PnP manager loads the drivers and starts the device.

4. The PnP manager loads the appropriate function driver and any optional filter drivers for the device. The PnP manager calls the DriverEntry routine for any required driver that is not yet loaded. The PnP manager then calls the AddDevice routine for each driver, starting with lower-filter drivers, then the function driver, and, finally, any upper filter drivers. The PnP manager assigns resources to the device, if required, and sends anIRP_MN_START_DEVICE to the device's drivers.

5. If the driver package provides a co-installer, Windows issues device


installation function (DIF) codes to the co-installer for additional installation processing. This allows the co-installer to perform tasks before, during, and after the device is installed. In particular, Windows issues the following DIF codes to the co-installer:
o

Windows sends a DIF_NEWDEVICEWIZARD_FINISHINSTALL DIF code before it displays the standard Finish page. This notifies the coinstaller to supply finish-install wizard pages (if any) to add custom pages to change device settings, if necessary, or install application software. Starting with Windows Vista, the operating system sends a DIF_FINISHINSTALL_ACTION DIF code after all other installation operations are complete. This notifies the co-installer to perform finishinstall actions (if any) to install application software.

As soon as this step is complete, the device is installed and ready to be used. Microsoft Windows users Depending on how the driver has been packaged is what determines how the driver will be installed. Below is additional information about each of the methods developers use to distribute their drivers and how you would install the drivers in Microsoft Windows. General driver tips Below are some general insights to help prevent any additional frustration that may be encountered while installing drivers. Drivers on CD or floppy diskettes: Almost all computer and hardware manufacturers include a group of drivers for different hardware devices and often for each of the supported versions of Windows. For example, the driver CD you receive with your printer likely contains the drivers for dozens of different printers. Not just the printer you purchased, which means when installing the drivers make sure you're installing the drivers for your printer, not another printer model and that

you're installing it for the version of Windows you're running on your computer. Below is an example of how a file structure may look on your disk. CD Example: -PrinterA100 --Win9x --Win2k --WinXP -PrinterA200 --Win9x --Win2k --WinXP -PrinterB100 --Win9x --Win2k --WinXP If for example you had a PrinterA200 and were using Windows XP you would find your drivers in the PrinterA200\WinXP directory. Downloading drivers: Almost all drivers you download are going to be a single file if the file is not an executable file it is almost definitely a compressed file that contains all the driver files. In order to install the driver you will first need to uncompress the file. When extracting / uncompressing the drivers make sure to remember where you place the folder containing the drivers as you will need to point Windows to this folder when installing the drivers. We usually recommend users install the driver files in a folder on their desktop as it's an easy place to remember and locate. Finally, the single file or the files extracted from the compressed file can be deleted after you have finished installing the drivers. Executable Many computer and hardware manufacturers today are pre-packaging their drivers into executable files or have the drivers installed through the setup file, which means double-clicking the setup file or the file you download should install the drivers to the computer for you. Note: Many developers may package their drivers in a compressed file, which means before looking for the setup file you may need to uncompress the downloaded file. Information about doing this was explained above. If after uncompressing the file it still does not contain an executable file, setup file, or

does not install your hardware device continue with the below recommendations. Finally, if you were successful in installing your drivers make sure to reboot the computer after the drivers have been installed. Using the have disk option Often computer manufacturers and hardware manufacturers will also place the drivers on the CD, diskette, or download for Windows to find and use during its hardware detection. Below are steps on how to install drivers for a new device and upgrade a devices driver for this setup. Installing a new device Upgrading drivers for pre-existing device Installing a new device 1. Open Windows Device Manager. 2. In the Device Manager make sure the device you're attempting to install is not already listed from past install attempts. If the device is found highlight it and remove it from Device Manager to prevent any conflicts during the install. 3. Once Device Manager looks ok reboot the computer. 4. As the computer is rebooting an install new hardware wizard should appear if Windows detects the new hardware using this wizard you should be able to point Windows to the folder containing your drivers either on the CD, diskette, or the folder containing the files you downloaded. If Windows does not detect any new hardware open Control Panel and doubleclick the Add hardware icon to run the hardware detection wizard. During the steps you will have an option to tell Windows you have a disk containing the drivers for your new hardware device, at this point Windows to the directory containing the drivers for your device. Once drivers have been installed reboot. Upgrading drivers for pre-existing device 1. Open Windows Device Manager. 2. In the Device Manager locate the device you wish to update the drivers for. 3. Right-click the device and click Properties. 4. In the Properties window click the Driver tab. 5. Click the Update Driver button.

6. In the Hardware Update Wizard point Windows to the location of the updated drivers on your hard disk drive Once drivers have been installed reboot. Install through the .inf file Finally, if the above recommendations do not work the installation instructions for drivers and hardware devices are always contained in a .inf file that is located within the drivers. Locate the .inf for your version of Windows, right-click that file and choose the option for install. Note this is a very raw form of installing a drivers and it is important that you make sure you're installing the correct .inf file and not a .inf file for another device or for a different version of Windows. Additional information and tips about locating the drivers was explained earlier in the general driver tips section. Once you have right-clicked and installed the driver, reboot the computer. One of the above three recommendations should have installed / updated the drivers successfully onto the computer. If you're still having difficulties getting the device to install it's possible you're not encountering a hardware issue and not an issue with the drivers. Refer to the troubleshooting steps for your hardware device for additional help and information.

Das könnte Ihnen auch gefallen