Drivers Deployment

MSI Package Builder is capable of deploying hardware and software drivers. It is possible to create or delete basic drivers and install or pre-install driver packages in scope of an MSI package installation.

App-V and MSIX/AppX packages do not support configuring the device drivers during deployment, so, when generated, those changes are included into MSI deployment packages only.

Both basic drivers and drivers from packages can be registered as device class filters by MSI Package Builder, if required. Changes to the operating system drivers are displayed in the Drivers view when the Drivers node of a project is selected in the Projects view. Changes performed during the monitoring process are added automatically to the drivers deployment actions. Let us take a closer look at configuring the drivers deployment actions.

Basic Driver

Basic Driver

The Basic Driver button from the New group on the regular Project and contextual Drivers Ribbon pages should be used to add a new basic driver deployment action to the currently configured project.

Driver Package

Driver Package

The Driver Package button from the New group on the regular Project and contextual Drivers Ribbon pages should be used to add a new driver package to the currently configured project to be either installed or pre-installed by the resulting MSI package.

DIFx Driver Package

DIFx Driver Package

The DIFx Driver Package button from the New group on the regular Project and contextual Drivers Ribbon pages should be used to add a new Driver Installation Framework package to the currently configured project to be either installed or pre-installed by a resulting deployment package.

The basic driver is a simple driver that is shipped as a single dynamic link library (usually as the *.sys file) and is managed like a windows service. A driver package consists of all the software components that you must supply for your device to be supported under Windows. The following components are necessary to install and support a device on a Windows operating system: the driver file (*.sys), the installation files (*.inf and *.cat) and other files (the device installation application, the device icon, the device property pages, etc).

To add a new basic driver deployment action, you should either choose the New Basic Driver item from the pop-up menu or press the Basic Driver button from the New group on the regular Project and contextual Drivers Ribbon pages. Within the New Basic Driver dialog, you are suggested to configure the basic driver deployment action in detail Pic 1.

Adding a basic driver to be created and started during an MSI package installation

Pic 1. Adding a basic driver to be created and started during an MSI package installation

While adding a basic driver deployment action, you should first specify the driver name and the operation to be performed on the driver. You can choose between the Create and Delete operations. The scope of settings available for configuring depends on the selected operation. Let us describe each operation in detail.

The Create operation is used if the driver is a part of an installation. Thus, it is created together with the generated MSI package installation. Along with the driver name used to install the driver, you should also provide the display name used for the driver and the path to the file from the current project to be used as the driver binary on the General tab. You can also provide the driver security catalog file, if required. It is also recommended that the driver description be provided, which is displayed in the computer management console for each driver. Other options displayed on the General tab are the advanced driver loading settings, which are the driver type, the startup type, the load order group and the error control.

The Driver Type field is used to choose the type of the basic driver to be installed: either a kernel driver or a system driver.

As for the Startup Type, the following values can be used:

  • Boot - the device driver required to start the computer;
  • System - the non-boot-start driver that detects device(s) that are not PnP-enumerable;
  • Auto - the Non-PnP driver that must be started by the service control manager;
  • On Demand - the PnP driver;
  • Disabled - the disabled driver.

The Load Order Group is used to define the group this driver should be added to for loading by the operating system.

You can choose from the following Error Control levels:

  • Normal - the startup program logs error in the event log but continues the startup operation.
  • Critical - the startup program logs error in the event log, if possible. If the last-known-good configuration is being started, the startup operation fails. Otherwise, the system is restarted with the last-known good configuration.
  • Ignore - the startup program ignores error and continues the startup operation.

The Dependencies tab is also used while configuring the driver creation. It allows defining the drivers this driver depends on. The driver name is provided to the Dependency field, and you can add, edit and remove dependencies on-line using the corresponding buttons built into this field.

On the Security tab, you can specify the permissions to be explicitly assigned to this driver.

While specifying the driver name, display name, description and dependencies you can use the property definition placeholders standing for the standard MSI properties. See the Property Definition Placeholders section of this document for the list of available placeholders.

For the Delete operation, the Dependencies tab is not used and only the Name field from the General tab is applicable. The driver with the matching name will be deleted from the target PC while installing the generated MSI package.

If you would like to register the basic driver as a filter for one or more device classes, you should enable the Register this driver as a device class filter option on the Install Options tab. The Install Options tab contains a list of device class filters the configured driver is used as. You can add and remove the filter configuration entries using the corresponding buttons on the toolbar. Let us take a closer look at the device class filter configuration Pic 2.

Registering a driver as an upper-level device class filter

Pic 2. Registering a driver as an upper-level device class filter

When registering a driver as a device class filter, you should provide the device class to register the driver to into the Device Class field. Within the Filter Type drop-down, you should choose the type of the filter to be registered. A Lower-Level filter driver monitors and/or modifies I/O requests to a particular device. Typically, such filters redefine the hardware behavior to match the expected specifications. For example, a lower-level class filter driver for mouse devices could provide acceleration performing a nonlinear conversion of the mouse movement data. An Upper-Level filter driver adds value to a particular device. For example, an upper-level device filter driver for a keyboard could enforce additional security checks. The Dependency and Order fields are responsible for the filter driver position in the scope of all filters for the specified device class.

To add a new driver package deployment action, you should either choose the New Driver Package item from the pop-up menu or press the Driver Package button from the New group on the regular Project and contextual Drivers Ribbon pages. If you are going to deploy the package that requires deployment via the DIFx (Driver Installation Framework), use the New DIFx Driver Package menu item and the DIFx Driver Package button respectively. The file system browser will be opened to let you choose the driver information file for the package. As soon as it is chosen, you will see the dialog where you are suggested to configure the driver package deployment action in detail. Let us use the New Driver Package one as the example Pic 3.

Adding a driver package to be pre-installed during an MSI package installation

Pic 3. Adding a driver package to be pre-installed during an MSI package installation

Common information on the driver package being configured is displayed on the General tab. As you can see, the Driver Information and Security Catalog fields, as well as the Driver Package Files table, are filled automatically with the files provided by the selected installation file. You can change any of these aspects in the future, if required.

The next step is providing the driver name and configuring the deployment. The name is provided to the Name field. The next step is to specify the target platform in the Platform field. The platform can be specified only during the driver package creation. As for the deployment options, you can choose if the driver should be installed or pre-installed within the Operation drop-down. The Install operation should be chosen if the device with an appropriate ID is already present in the system or it is a virtual device created by the installer. The Pre-Install operation allows you to install a package to the driver storage. The operating system will use the installed driver as soon as an appropriate device is installed to the system.

The content of the Install Options tab differs depending on the type of the driver package. It may be possible to choose the devices or sections from the package to be installed, the hardware component ID and/or register a driver from the configured package as a filter for one or more device classes.

Move Up

Move Up

The Move Up button from the Order group on the contextual Drivers ribbon page should be used to move the selected drivers up the deployment order.

Move Down

Move Down

The Move Down button from the Order group on the contextual Drivers ribbon page should be used to move the selected drivers down the deployment order.

By default, the drivers deployment order is the same as the addition order, but you can reorder the drivers using the Move Up and Move Down items from the pop-up menu or the Order group on the contextual Drivers Ribbon page.

Edit

Edit

The Edit button from the Management group on the contextual Drivers Ribbon page should be used to change the selected driver deployment action.

Delete

Delete

The Delete button from the Management group on the contextual Drivers Ribbon page allows you to delete the selected driver deployment actions from the selected project.

Copy To

Copy To

The Copy To button from the Management group on the contextual Drivers Ribbon page should be used to copy the selected driver deployment actions to another location.

Move To

Move To

The Move To button from the Management group on the contextual Drivers Ribbon page allows you to move the selected driver deployment actions to another location.

Driver deployment actions can be changed, deleted or transferred another location. To change the driver deployment action, select it in the Drivers view and double-click it. Alternatively, you can either choose the Edit item in the pop-up menu or click the Edit button on the contextual Drivers Ribbon page. While editing a driver deployment action, it is possible to configure the same options as those available during the action creation. To delete specific actions from a project, select them and choose the Delete item from the pop-up menu or click the Delete button on the contextual Drivers Ribbon page.

If the project contains some drivers that you don’t want to include into the generated package, you can use the context menu option Exclude from Build. Excluded resources are displayed in the project using the faded icons. Use the context menu option Include in Build for excluded resource to add them into the generated package. The Exclude from Build option allows you to make experiments with the set of resources included into the resulted package with no deleting resources from the project.

The well-known drag/drop and copy/paste techniques are fully supported for copying and moving driver deployment actions between projects. You can also use the Copy To and Move To buttons from the Management group on the contextual Drivers Ribbon page to transfer the selected driver deployment actions to another location. While using these buttons, you are suggested to select the target location in the dialog and confirm your selection Pic 4.

Copying driver deployment actions

Pic 4. Copying driver deployment actions

Now that you have been introduced to the features used to manage driver deployment actions with MSI Package Builder, you should be able to deploy drivers by the generated MSI package with full understanding.