Microsoft KB Archive/314479

From BetaArchive Wiki

Article ID: 314479

Article Last Modified on 5/23/2003



APPLIES TO

  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional



This article was previously published under Q314479

For a Microsoft Windows 2000 version of this article, see 254078.

IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry


SUMMARY

This article describes the steps required to add original equipment manufacturer (OEM)-supplied drivers to Microsoft Windows installations. This article includes only those drivers that are typically installed during graphical user interface (GUI)-mode Setup or post-Setup by standard Plug and Play enumeration. This permits you to pre-load OEM Plug and Play drivers that you can use later, when the associated hardware is introduced in the system.

This article describes how to add OEM Plug and Play drivers in the following situations:

  • Unattended Setup
  • Sysprep Setup
  • Remote Installation Service (RIS) installations
  • Riprep images
  • Existing Windows installations

For additional information about how to add OEM-supplied mass-storage devices during text-mode Setup, click the article number below to view the article in the Microsoft Knowledge Base:

314859 Limited OEM Driver Support Is Available with F6 During Windows XP Setup


MORE INFORMATION

Drivers that are installed during the "Installing Devices" portion of GUI-mode Setup have to be found in certain locations. At this point, Setup installs the devices (by using Plug and Play IDs) that have been enumerated by Windows Plug and Play. Setup searches a predefined path on the drive, looking in .inf files to find the best match for the Plug and Play ID of the device. This path is defined in the following registry location and is set to %SystemRoot%\Inf by default:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\DevicePath: REG_EXPAND_SZ:%SystemRoot%\Inf


Setup uses this path to locate .inf files for device installation. After Setup, this path is also used for any new hardware found and installed. If you modify this key during Setup by using the Sysprep.inf or Unattended answer file, the value is saved and is also used after Setup.

The following sections of this article explain how to add OEM-supplied drivers to unattended or Sysprep Setup installations of Windows.

Unattended Setup

To add drivers to an unattended Setup, follow these steps.

Note If the OEM-supplied drivers are not digitally signed, you receive a warning message about this during Setup. To turn off this message, add the following entry to the [Unattended] section of the Setup answer file (Unattend.txt):

DriverSigningPolicy = Ignore
                

For additional information about this setting, click the article number below to view the article in the Microsoft Knowledge Base:

236029 How to Set the Driver Signing Policy for Windows 2000 Unattended Setup


  1. Create a distribution point on a network server by copying the I386 folder from the Microsoft Windows CD-ROM to a location on the server. Use the Setup Manager utility (Setupmgr.exe) to create an Unattended.txt file. You can find Setupmgr.exe on the Windows CD-ROM in the Support\Tools folder in the Deploy.cab file, along with the Setupmgr.chm file that contains information about Windows unattended Setup.For additional information about how to create an answer file, click the article number below to view the article in the Microsoft Knowledge Base:

    308662 HOW TO: Use Setup Manager to Create an Answer File in Windows 2000

  2. Create a $oem$\$1\Drivers folder in the I386 folder that you copied to the distribution point. You may want to create additional folders in the Drivers subfolder, depending on the hardware that you want to install (for example, network adapter, modem, or video driver). The $1 folder resolves to %SystemDrive%. During text-mode Setup, these folders and files are copied to the %SystemDrive%\Drivers folders. For example:

    \i386
    -\$oem$
    - - \$1
    - - - \Drivers
    - - - - - \NIC
    - - - - - \MODEM
    - - - - - \VIDEO

  3. Copy all of the OEM-supplied driver files for the device to the folder (or folders) created in the preceding step.
  4. Add the OemPnPDriversPath = Driver_Paths entry in the [Unattended] section of the Setup answer file. You can list multiple paths in this key by separating them with a semicolon (;), as follows:

    [Unattended]
    OemPnPDriversPath = Drivers\NIC;Drivers\Modem;Drivers\Video
                            

    Note The %SystemDrive% environment variable string is automatically inserted before each of the listed search paths.

  5. Save the answer file.

During GUI-mode Setup, when the system searches .inf files for Plug and Play IDs, it also looks in the paths noted in the OemPnPDriversPath entry, along with the standard default path of %WinDir%\Inf. The %WinDir%\Inf path is listed first in the search order, but if you have a device that is supported by more than one .inf file (Windows may include a driver that offers generic functionality), Setup continues to search all paths specified in the OemPnPDriversPath entry. Even though it may find multiple matches, Plug and Play uses the .inf file that offers the best match, and then installs the associated device driver to support the device.

Sysprep Setup

The process by which you add OEM-supplied drivers to a Windows Sysprep Setup is similar to the procedure described in the "Unattended Setup" section of this article, except that you do not have to create the distribution share. To add drivers to the mini-setup wizard of Sysprep, follow these steps:

  1. On the root of the volume where the %WinDir% folder is located, create a folder structure to hold the OEM-supplied drivers. For example:

    \Drivers
    - - \NIC
    - - \VIDEO
    \Sysprep
    \WINNT

  2. Copy the OEM-supplied drivers to their appropriate subfolders.
  3. Add the OemPnPDriversPath = Driver_Paths entry in the [Unattended] section of the Sysprep.inf file. You can list multiple paths in this key by separating them with a semicolon (;), as shown in the following sample code:

    [Unattended]
    OemPnPDriversPath = Drivers\NIC;Drivers\Video
                        

    Note The %SystemDrive% environment variable string is automatically inserted before each of the listed search paths.

If you do not want the OEM-supplied drivers to remain on the volume after mini-setup is completed, you can place the folder structure that you created in the preceding step in the Sysprep folder. Make sure that you adjust the OemPnPDriversPath = key appropriately. The Sysprep folder (along with all of its subfolders) is automatically removed after Setup is completed.

Save the Sysprep.inf file in the Sysprep folder, and then run Sysprep.exe. All Plug and Play devices (including those found by using the OEM driver .inf files) are automatically installed during mini-setup on the target computers. Note that you do not have to specify the -pnp command-line switch unless there are earlier version (ISA) devices on the target computers. If you use the -pnp command-line switch, a full Plug and Play re-enumeration of all devices is performed. This adds 5 to 10 minutes to the Sysprep mini-setup process.

Note When you specify additional mass-storage controllers, the -pnp command-line switch may cause some additional hard disk controllers to appear in Device Manager. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

314460 System Preparation Tool and Answer File Usage


Note If the OEM-supplied drivers are not digitally signed, the mini-setup wizard postpones the installation of the device until an administrator logs on to the computer. This is referred to as client-side versus server-side installation, which occurs during mini-setup.

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

256204 Unsigned Drivers Not Installed During Sysprep Mini-Wizard Without "-pnp" Switch


RIS Installations

The process of adding OEM Plug and Play drivers to RIS installations involves the same steps that are listed in the "Unattended Setup" section of this article, with two small adjustments:

  1. Place the $oem$ folder at the same level as the \I386 folder of the RIS image. For example:

       RemoteInstall\Setup\%language\Images\%dir_name%\i386
       RemoteInstall\Setup\%language\Images\%dir_name%\$oem$\$1\Drivers            
                                                            \NIC
                                                            \MODEM
                                                            \VIDEO
                        
  2. Modify the RIS image default template (Ristndrd.sif). In the [Unattended] section, change the OemPreinstall = key value from No to Yes, and then add the OemPnPDriversPath = Driver_Path entries. You can list multiple paths in this key by separating them with a semicolon (;), as follows:

    [Unattended]
    OemPreinstall = Yes
    OemPnPDriversPath = Drivers\NIC;Drivers\Modem;Drivers\Video
                        

    Note The %SystemDrive% environment variable string is automatically inserted before each of the listed search paths.

    Note If one of the OEM-supplied drivers is for a network card device, the RIS server must have this file available when you boot into text-mode Setup.

    For additional information about this process, click the article number below to view the article in the Microsoft Knowledge Base:

    315279 How to Add a Third-Party OEM Network Adapter to an RIS Installation

  3. Stop and then restart the BINL service on the RIS server. To do this, type the following commands at the command prompt, pressing ENTER after each one:

    net stop "boot information negotiation layer"
    net start "boot information negotiation layer"

Riprep Images

Riprep and Sysprep share much of the same functionality; therefore, when you add OEM Plug and Play drivers to computers that will be imaged, this process involves steps similar to those used for Sysprep. Before you run Riprep against the image computer to copy it to the RIS server, follow these steps:

  1. Create a folder named Sysprep on the %SystemDrive% folder (this is most likely drive C, because Riprep.exe can copy only one volume/partition).
  2. On the root of the same volume, create a folder structure to hold the OEM-supplied drivers, as shown in the following example:

    \Drivers
    - - \NIC
    - - \VIDEO
    \Sysprep
    \WINNT

  3. Copy the OEM-supplied drivers to their appropriate subfolders.
  4. Create a Sysprep.inf file in the Sysprep folder, and then add the [Unattended] and OemPnPDriversPath = Driver_Path entries. You can list multiple paths in this key by separating them with a semicolon (;), as in the following example:

    [Unattended]
    OemPnPDriversPath = Drivers\NIC;Drivers\Video

    Note The %SystemDrive% environment variable is automatically inserted before each of the search paths.

    Note If the device has already been recognized by the operating system as a known or unknown device, you must remove the device through Device Manager before you run Sysprep, or the updated drivers will not be installed at startup during mini-setup.

  5. Run Riprep.exe from the \\RisServer\Reminst\Admin\I386 folder on the client computer to copy the image to the selected RIS server. Riprep looks in the Sysprep folder for a Sysprep.inf file, reads the OemPnPDriversPath= key, and then updates the following registry entry in the computer before it copies the registry to the server so it is available for use during the mini-setup:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Devicepath

    Note The default Riprep.sif file created during this process is unaffected by the entry in the Sysprep.inf file created in the preceding steps.
  6. Stop and then restart the BINL service on the RIS server. To do this, type the following commands at a command prompt, and then press ENTER after each one:

    net stop "boot information negotiation layer"
    net start "boot information negotiation layer"

    Note If one of the OEM-supplied drivers is for the primary network card, the RIS server must also have this file available from a standard RIS flat image before the Riprep image is downloaded. If this is the case, you must also follow the procedure described in the "RIS Installations" section of this article, or use the procedure described in the following Microsoft Knowledge Base article:

    315279 How to Add a Third-Party OEM Network Adapter to an RIS Installation

    If the image is already created and you want to add OEM-supplied Plug and Play drivers, use RIS to download the image to a computer, follow the steps listed in the "Riprep Images" section of this article, and then "Riprep" the image back to the RIS server.

    Note If you use this method, the driver paths are entered two times in the following registry key:

    SOFTWARE\Microsoft\Windows\CurrentVersion\DevicePath

    For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

    258862 Riprep.exe Adds Duplicate Paths to the Registry


Existing Windows Installations

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
You may have to add new hardware devices to existing Windows-based computers that require OEM-supplied drivers. Although you may have to install the new device, you may want to distribute the OEM-supplied drivers in a controlled way or to be centrally located on one server. To do this, follow these steps:

  1. Determine whether you want to copy the drivers locally or to store them on a central distribution server. If you want to store the drivers locally on the computer's hard disk, you must have a method to copy the drivers to the computer (for example, by using logon scripts, Microsoft Systems Management Server batch jobs, or other methods).
  2. After you determine the distribution method, obtain the path for the device drivers. If you want to copy them locally, the path may be C:\Drivers\Nic. If you want them centrally located server, the path may be \\ServerName\Drivers\Nic (where Drivers is a shared folder).
  3. Update the DevicePath key in the local computer's registry to reflect the new OEM driver locations. You must have an automated method to remotely update the registry key. You can use Regedit files together with logon scripts or an SMS batch job. You can find the default value in the following registry key:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\DevicePath: REG_EXPAND_SZ:%SystemRoot%\Inf

  4. Use Regedit.exe to edit the DevicePath key so that path where the drivers are located is included in the search path.

    For example, if the drivers are copied locally to the root of the drive on which the %WinDir% folder resides (Drivers\Nic), the DevicePath final value should read as follows:

    DevicePath: REG_EXPAND_SZ:%SystemRoot%\Inf;%SystemRoot%\Drivers\Nic

    If the drivers are kept on a centrally located server or distribution point, add the UNC path to the OEM-supplied drivers. For example:

    DevicePath: REG_EXPAND_SZ:%SystemRoot%\Inf;\\ServerName\ShareName\Drivers\Nic

    NOTE: %SystemRoot% is not automatically appended in the preceding case because the Setup process does not add the values. You must manually type the value of %SystemRoot% when you edit the registry.

After you have completed these steps and new hardware is installed, and then a user logs on, Plug and Play locates the new hardware and searches the device paths that you specified to locate the OEM-supplied drivers. Please note that all the rules that apply to signed and unsigned drivers also apply to devices installed after Setup. If the OEM-supplied drivers for the new device are not digitally signed and a nonadministrator user logs on to the computer after the new hardware is installed, the user cannot complete the installation of the device until an administrator logs on to the computer.

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

219435 Non Administrator Permissions to Load and Unload Device Drivers


Note If the operating system has already recognized the device as a known or unknown device, you can use the UpdateInstalledDrivers switch in Sysprep.inf to specify that Plug and Play is called after Mini-Setup, to re-enumerate all the installed drivers, and to install any updated drivers in the driver path. For additional information about the UpdateInstalledDrivers switch for Sysprep.inf, see the Microsoft Windows XP Corporate Deployment Tools User's Guide (Deploy.chm) on the Windows XP CD.


Additional query words: pnp w2000ris nic

Keywords: kbinfo kbenv kbsetup KB314479