Windows Driver Kit: Device Installation
Using DIFxApp Merge Module
Description
This DIFxApp sample demonstrates how to use the DIFxApp merge module (DIFxApp.msm) to install a driver package that is included in a Microsoft Windows Installer installation package for an application.
Theory of Operation
This sample uses the sample Plug and Play (PnP) driver package that is provided in the Windows Driver Kit (WDK). The src\setup\DIFxPkgs\x86\PlugPlay directory in the WDK contains the files that make up the PnP driver package sample.
Building the Sample
You can add DIFxApp.msm to the Windows Installer installation package either while the package is being created or after it has been created.
Method 1: Adding DIFxApp.msm to the installation package after it has been created
The DIFxAppSample.msi file in the src\setup\DIFxApp\MergeMod directory is an installation package that contains the Plug and Play (PnP) driver package. To add DIFxApp.msm to DIFxAppSample.msi, do the following steps:
- Use the orca.exe tool to merge the DIFxApp.msm merge module with DIFxAppSample.msi. DIFxApp.msm is located in the DIFxApp directory. The orca.exe tool is included with the Windows Installer Software Development Kit (SDK). For example, type the following command at the command prompt:
orca -m DIFxApp.msm -f DefaultFeature -c DIFxAppSample.msi - Edit the MsiDriverPackages table in DIFxAppSample.msi, as described in the "MsiDriverPackages Custom Table Schema" section in the DIFxApp white paper. This white paper is included in the Documentation directory that is provided with the Driver Install Frameworks tools package.
Method 2: Adding DIFxApp.msm to the installation package while it is being created
The exact steps for this method depend on the software that you are using to create the installation package. The basic idea is to add the DIFxApp merge module (DIFxApp.msm) to your project just as you would add any other merge module.
For example, if you are using Microsoft Visual Studio, do the following:
- Create a new Visual Studio setup project.
- Add the Plug and Play (PnP) driver package files to the project so they get copied to Application Folder in the file system on the target computer.
- Add DIFxApp.msm to the project (that is, on the Project, point to Add, and then click Merge Module).
- Build the project by (that is, on the Build menu, click Build Solution). A new DIFxAppSample.msi file is created in the Debug or Retail directory, depending on whether Visual Studio was configured to build the Debug or the Retail version.
- Edit the MsiDriverPackages table in DIFxAppSample.msi as described in the "Authoring an MSI Installation Package That Uses DIFxApp" section in the DIFxApp white paper. This white paper is included in the Documentation directory that is provided with the Driver Install Frameworks tools package.
To install the toaster driver package, run DIFxAppSample.msi.
Installation
General
This sample works only on an 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. Build machine: CAPEBUILD