Preinstalling Driver Packages
Windows Driver Kit: Device Installation
Preinstalling Driver Packages

To preinstall driver files, your device installation application should follow these steps:

  1. On the target system, create a directory for the driver files. If your device installation application installs an application, the driver files should be stored in a subdirectory of the application directory.
  2. Copy all files in the driver package from the distribution media to the directory that is created in step (1). The driver package includes the driver or drivers, the INF file, the catalog file, and other installation files.
  3. Call Aa906201.internet_link_sm(en-us,MSDN.10).gifSetupCopyOEMInf specifying the INF file in the directory that was created in step (1). Specify SPOST_PATH for the OEMSourceMediaType parameter and specify NULL for the OEMSourceMediaLocation parameter. SetupCopyOEMInf copies the INF file for the driver package into the %SystemRoot%\Inf directory on the target system and directs Windows to store the source location of the INF file in its list of preprocessed INF files. SetupCopyOEMInf also processes the catalog file, so the PnP manager will install the driver the next time that it recognizes a device that is listed in the INF file.

When the user plugs in the device, the PnP manager recognizes the device, finds the INF file copied by SetupCopyOEMInf, and installs the drivers copied in step (2). (For more information about copying INF files, see Copying INFs.)


Send feedback on this topic
Built on November 19, 2009
© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View