How to integrate OEM drivers into Windows 2000/XP packages

Article:TECH108868  |  Created: 2004-01-05  |  Updated: 2007-01-16  |  Article URL http://www.symantec.com/docs/TECH108868
Article Type
Technical Solution

Issue



This document explains how to integrate OEM drivers into Microsoft® Windows® 2000/XP setup.


Solution



Drivers that are installed during the "Installing Devices" portion of GUI-mode Setup must be in the folders that are expected by Windows.

The following sections provide instructions to integrate PnP drivers into the Windows XP setup. If you are not familiar with this process, before performing the actual configurations, we recommend that you read the sections, "Brief introduction to integrating device drivers into Windows 2000/XP installation packages" and "Driver locations and handling in the CCM OS script",

Click an icon to either expand ( ) or collapse ( ) each section. (If you cannot expand a section, then read the document Cannot expand sections in a Symantec Knowledge Base document.)


Hide details for Brief introduction to integrating device drivers into Windows® XP and Windows® 2000 installation packages
Brief introduction to integrating device drivers into Windows 2000/XP installation packages
Setup installs the device drivers by using Plug and Play (PnP) IDs that have been enumerated by the Windows Plug and Play function. Setup searches for a predefined path on the local drive. The relevant information for the driver is stored in the driver information .inf files. Windows Setup tries to find the best possible match for the Plug and Play ID of the device.

The default installation search path is set to %SystemRoot%\Inf by default, and is defined in the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\DevicePath: REG_EXPAND_SZ:%SystemRoot%\Inf

Setup uses this path to locate .inf files for any device installation. Once the original Windows Setup ends, the path stays active for the MS PNP Hardware installation wizard. If you modify this key during setup by using the Sysprep.inf or any Unattended answer file, the value becomes permanent unless changed again.

In the params.txt file, CCM uses a hardcoded, dedicated parameter, "OemPnPDriversPath." The "OemPreinstall" switch in the params.txt file must be set to "Yes." For example:

[Unattended]
OemPnpDriversPath=the path to the oem drivers
i.e: OemPnpDriversPath=%WXPCABPATH%\nic;%WXPCABPATH%\video;%WXPCABPATH%\sound
OemPreInstall=Yes

If this switch is not set to yes, the OEM drivers are ignored.

Hide details for Driver locations and handling in the CCM OS script.
Driver locations and handling in the CCM OS script.
There are many different methods to implement PnP drivers. The standard CCM Windows 2000 script and the early Windows XP scripts used the "Machinetype" admin parameter.

The machine type then includes references to the subdirectories where the drivers are located, resulting in the following depot directory structure:

\w2pos01e.050
-\4
- - \machine
- - - \GX110
- - - - - \NIC
- - - - - \MODEM
- - - - - \VIDEO


Later XP scripts handle OEM drivers using a script parameter named "COMPTYPE," resulting in the following depot directory structure:

\wxppr03e.050
-\3
- - \comptype
- - \pnp
- - - \MODEM
- - - \VIDEO
- - - \NIC
- - - - \e100b
- - - - \3c90x
- - \storage

The comptype folder then acts as a root folder containing the directory structure specified by the comptype parameter. The contents of the folders are basically batch files. These batch files are responsible for setting environment variables to later identify the Pnp driver needed, which is stored in the special PnP folder. This method has the advantage of using the same driver for different machine types without storing it in different locations.

The actual copying of the driver itself is indicated and regulated by a separate batch file named copydrv.bat. This file copies to the location specified through the already mentioned OemPnpDriversPath configuration parameter..
Hide details for Step1 – Copy the driver into the CCM Depot
Step 1: Copy the driver into the CCM Depot
To copy the driver (or drivers) into the CCM Depot, do the following:

  1. Download the required drivers the new hardware to be supported to a temporary location. (Make sure they support the operating system you are installing.)
  2. Create a sub-folder in your temporary location, called INF
  3. Expand or extract the driver download which usually comes either in a single executable setup.exe file or in .cab files.
  4. Once the inf file for the driver and any additional files are extracted, copy the driver and its inf files into your temporary INF folder.
  5. The goal is to isolate the bare minimum files needed for the driver installation.
  6. Create a folder for the new machine type in the depot part folder of the OS installation package. The location differs depending on the method you are using. For example, default root locations in most standard CCM packages will be one of the following:
    • Windows 2000
      ...\ccm\depot\w2pos01e.050\4\machine
    • Windows XP
      ...\ccm\depot\wxppr01e.051\3\pnp


Hide details for Step 2 – Create an additional Admin Parameter
Step 2: Create an additional Admin Parameter
To create an additional Admin Parameter, do the following:
  1. If you have not already done so, create a temporary working directory for your CCM package library.
  2. Export or copy the original CCM OS package from \ccm\config\sw\ to the temporary working directory.
  3. Open the config.swp and scroll down to the Admin Parameter section.
    To edit the config.swp, you may have to remove the read-only attribute.
  4. Locate the Machine Type admin parameter used, for example: MACHINE_TYPE -n"Machine Type (Model)" -d"LIST" = \
  5. You may use any of the existing lines as a template (EXCEPT the last line). If you elect this option, then either write a new line, or copy and paste any existing line and re-edit the values to represent the newly added machine type. In the example below, the first value corresponds to the name of the machine type folder (see step 1). The second value is the descriptive name for the CC "Set Parameters" computer used to deploy the package:

    "GENERIC", "Generic Computer"; \
    "GX1", "Dell GX 1"; \
    "GX110", "Dell GX 110"; \
    "GX150", "Dell GX 150"; \
    "GX260", "Dell GX 260"; \
    "ACRPOWER", "Acer Power"; \
    "ACRTOWER", "Acer Tower"; \
    "ACRFLEX", "Acer Flex";
  6. Save and close the config.swp file.


Notes:
  • Early Windows 2000 or Windows XP packages may include the following line in the config.swp file:

    smecp16 -s \\depot\%W2KPDEPOT%\%PRIM_RELEASE%\machine\%MACHINE_TYPE%\*.* C:\drivers


    This line copies the drivers for the machine type to c:\drivers on the client, as selected by the admin parameter above.
  • Later packages will perform copying by using the copydrv.bat. batch file (described, above). Make sure that additional entries to other locations are referenced in the copydrv.bat. file.


Alternate solution without defining supplementary administration parameters
CCM uses the computer type parameters described above to avoid copying unnecessary drivers. This may not be an efficient method when you have to perform a group-wise distribution in a distributed environment where the hardware type is either not known or the target group contains many different types.

For this kind of situation, you may want to have an "All Drivers", "fits all" policy section, rather than select single machine types. Instead of multiple admin parameters, you only have one primary, or none at all. In this case, you need to do the following:
  1. Create a "goto" section,
  2. Make sure that all directories are included in the OemPnpDriversPath section,
  3. Make sure you create the necessary folder structure on the target machine and
  4. Copy the *.* driver files in the appropriate locations.

Windows Setup will take care of the rest.
Hide details for Step 3 – Edit the Params.txt (optional)
Step 3 – Edit the Params.txt (optional)

This step is only required if additional drivers for OEM devices are copied into locations other than those defined by the OemPnpDriversPath. Windows Setup will not recognize other locations unless referenced in the params.txt.

The value used by CCM for the OemPnpDriversPath can be extended to include more than one location. During the "Plug and Play" portion of the installation, The CCM "OemPnpDriversPath" parameter extends the standard search locations for drivers. For example:

In the following example, the DELL GX150 includes nonstandard additional drivers stored in drivers\storage, So,the value for OemPnpDriversPath must be appended with the additional information (and using a single semicolon to mark the entry) from:

OemPnpDriversPath=drivers\nic;drivers\video;drivers\audio;drivers\chipset

to:

OemPnpDriversPath=drivers\nic;drivers\video;drivers\audio;drivers\chipset;drivers\storage

Note: All OemPnpDriversPath are relative to %SystemDrive%: The CCM Set Up will insert the %SystemDrive% environment variable string automatically and prefix each of the listed search paths.

During GUI-mode Setup, the system searches to match .inf files for any Plug and Play IDs found. It first searches the paths specified in the standard default %WinDir%\InfOemPnPDriversPath entry, followed by the extensions specified by CCM.

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 already 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 for the same device, Plug and Play uses the .inf file that offers the best recent match, and then installs the associated latest device driver to support the device.

Note: You may receive a warning message about this during the Windows XP Setup, if the OEM-supplied drivers are not digitally signed. To turn off this message in Unattended set Ups, add the following entry to the [Unattended] section of the Setup answer file (Unattend.txt): DriverSigningPolicy = Ignore




References
For additional information about the Driver Signing Policy setting, see Microsoft article 236029, How to Set the Driver Signing Policy for Windows® 2000 Unattended Setup.

For Microsoft's step by step instructions for Windows 2000 & 2003 go to the following URL: http://support.microsoft.com/kb/254078/en-us


Technical Information
You can download the example batch files dell.bat and copydrv.bat.




Legacy ID



2004080517441060


Article URL http://www.symantec.com/docs/TECH108868


Terms of use for this information are found in Legal Notices