Installing and Registering Device Drivers and Services

Device drivers and services are executable files (either stand-alone EXE files or dynamically loadable libraries such as DLL, VXD, or WDM files) that provide some sort of hardware or system-related service. Installing a device driver or service usually requires two steps:

  1. Installation of the device driver or service executable file;
  2. Registration of the device driver or service with Windows.

Tarma Installer provides support for both steps. However, for the second step it requires that the device driver or service file is either self-registering, or that you provide a REGEDIT4-style file that specifies the registry changes required to register the device or service.

The appropriate installation folder for device drivers and services is platform dependent. However, if you use the <DriversDir> variable to refer to the installation folder, Tarma Installer will automatically select the correct folder for you. On Windows 9x, <DriversDir> resolves to the Windows System folder; on Windows NT, it is the Drivers subfolder.

Be aware of the fact that most, if not all, device drivers and services themselves are platform dependent in the same manner. To avoid installation or registration problems, you should therefore mark each executable file for installation only on the relevant platforms.

How to add a device driver or service to your project

To add a device driver or service to your Tarma Installer project, act as follows.

  1. Select the Project - Files page by clicking on its bullet in the Navigation area.
  2. On the Project - Files page, create the appropriate installation folder if it isn't already present in the Installation Folders Tree. The easiest method is as follows:

    1. Right-click on Installation Files to open the installation folders context menu;
    2. Choose Insert Special Folder to open its submenu;
    3. From the submenu that appears, choose Drivers Folder. This inserts <DriversDir>, which Tarma Installer will resolve correctly depending on the installation platform.
  3. Add the device driver or service executable file as an installation file to the appropriate folder. If necessary, refer to Installing Files for information about adding installation files to folders.
  4. Select the newly added file in the Installation files list to display its settings in the Installation file settings pane, then check that the following options are set:

  5. Repeat steps 3-4 as required for other device drivers or services.
  6. On the Installation page, make sure that the Require Administrator rights box is checked.

The net result is that the device driver or service will be installed and registered when your application is installed, and unregistered and removed when your application is uninstalled. All this is subject to the usual rules for file installation; in particular, Tarma Installer will correctly handle updates of existing copies of the file (based on a version check, if available) and will only remove the device driver or service if no other applications use it. This remains true even if the SharedDlls reference count of the file is unreliable (as is often the case).