Using DPInst

Description

The DPInst sample includes documentation and sample files to demonstrate how DPInst.exe is used to install a driver package.

Theory of Operation

DPInst is a redistributable executable program that is designed to deploy an INF file and driver package over the Web. The Toaster Driver Package sample and optional sample files are referenced in order to demonstrate the use of DPInst.exe:

  • Toastpkg.inf, tostx86.cat, and the i386 directory are located in the src\setup\DIFxPkgs\x86\PlugPlay directory.

  • DpInst.exe is located in the redist\difx\dpinst directory.

  • Optional. Dpinst.xml, eula.txt, ToasterRed.bmp, and Toaster.ico are located in src\setup\DPInst.

To run the DPInst sample, do the following:

  1. Copy DPInst.exe to the src\setup\DIFxPkgs\x86\PlugPlay directory.

  2. Optionally, customize DPINST by copying the dpinst.xml, eula.txt, ToasterRed.bmp, and Toaster.ico files that are contained in this directory to src\setup\DIFxPkgs\x86\PlugPlay.

  3. Run DPInst.exe and answer the questions in the wizard.

DPInst tries to update the driver for any existing toaster devices. If there are no existing devices, DPInst instead "pre-installs" the INF file so that Plug and Play (PnP) automatically finds a match when the hardware is subsequently inserted.

The driver package is now installed and ready to use in case the user plugs in a toaster.

You can remove the driver package by using the Add/Remove Programs wizard in Control Panel. As long as the driver package is not removed, users should never be prompted to reinstall any media or provide any location for driver files. In this way, you can "pre-install" all of the driver files as well so that the user is never prompted.

Plugging in a Toaster Device

For more information about how to simulate the plugging in of a toaster, see the Microsoft Windows Driver Kit (WDK) documentation. (Also, for more information about setting up the toaster bus enumerator and using the "enum" application to simulate plugging and unplugging of toaster devices, see the documentation for the toaster sample driver in the WDK). After the toaster bus enumerator is installed, type enum -p 1 the following at a command prompt.

The install proceeds without requiring any user interaction.

Installation

This sample works only on x86-based versions of the Windows operating systems. However, the techniques that are illustrated in this sample apply to Windows operating systems for other architectures as well.

Code Tour

File Manifest

The following file is located in the src\setup\DIFxApp directory.

File Description

DpInst.exe

Driver Package Install from the src\setup\DIFxApp directory

dpinst.xml

XML content for the Wizard

eula.txt

Sample EULA file

ToasterRed.bmp

Toaster sample bitmap

Toaster.ico

Toaster sample icon

 

 

 

Send comments about this topic to Microsoft

Build date: 6/29/2012