WiX DifxApp error on driver package install: Could not get services associated with driver package

The driver I am attempting to install is a Kernel Mini-Filter driver for Windows 7x64. The machine I am testing the installer on is in test mode and the driver files and .cat file are all signed with a certificate I made. I followed the instructions HERE and I am still unable to get the driver to install. I made sure to add DriverPackageType = FileSystemMinifilter to the [version] section of the .inf file.

Here is an excerpt from my WiX installer xml:

        <Directory Id="Driver" Name="Driver">
          <Component Id="MY-DRIVER-NAME" Guid="MY-GUID">
            <File
              Id="DRIVER_FILE1_SYS"
              Name="DriverFile1.sys"
              DiskId="1"
              Source="path_to_sys_file"
              Vital="yes"
              System="yes"
              ReadOnly="yes"
              KeyPath="yes"/>
            <File
              Id="DRIVER_FILE2_SYS"
              Name="DriverFile2.sys"
              DiskId="1"
              Source="path_to_sys_file"
              Vital="yes"
              System="yes"
              ReadOnly="yes"
              KeyPath="yes"/>
            <File
              Id="DRIVER_FILE3_SYS"
              Name="DriverFile3.sys"
              DiskId="1"
              Source="path_to_sys_file"
              Vital="yes"
              System="yes"
              ReadOnly="yes"
              KeyPath="yes"/>
            <File
              Id="DRIVER_FILE4_SYS"
              Name="DriverFile4.sys"
              DiskId="1"
              Source="path_to_sys_file"
              Vital="yes"
              System="yes"
              ReadOnly="yes"
              KeyPath="yes"/>
            <File
              Id="DRIVER_FILE_INF"
              Name="DriverFile.inf"
              DiskId="1"
              Source="path_to_inf_file"
              Vital="yes"
              System="yes"
              ReadOnly="yes"/>
            <File
              Id="DRIVER_FILE_CAT"
              Name="DriverFile.cat"
              DiskId="1"
              Source="path_to_cat_file"
              Vital="yes"
              System="yes"
              ReadOnly="yes"/>
            <difx:Driver Legacy="yes"/>
          </Component><!--LEGDriver-->

The "Id", "Name", and "Source" paths have been changed (I'm not actually using the values shown above it is just an example). I have no problem building the installer. When I run it with msiexec /i MyMsi.msi /l*v install.log I see the error DIFXAPP: ERROR: Could not get services associated with driver package

Then it tries to undo the changes and runs into a few more errors:

ERROR: Unable to revert to a previous driver store for service ''.
ERROR: Unable to open service '' to delete it because of error 0x7B

The .inf file has no problem installing with the command:

RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 path-to-inf\infname.inf

It also successfully installs via 'right-click install'.

Adding the 'RUNDLL32.EXE' command above as a custom action ExeCommand to my WiX installer instead of using DifxApp works when installing the .msi file on the machine manually, however, when deployed via GPO from an Active Directory server (Per-Computer GPO), the installation does not complete. (Everything except the INF install completes).

Answers


Turns out the answer is a modified version of the RUNDLL32.exe command. Change the 132 to 131

RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 131 path-to-inf\infname.inf

According to http://msdn.microsoft.com/en-us/library/aa376957(v=vs.85).aspx

128 + 4 = 132 = Ask the user to reboot if required 128 + 3 = 131 = Don't ask just reboot

Since this is being deployed from AD and installed on boot before any user is logged on, I imagine it fails when the program tries to create a popup box to ask if the user would like to shutdown. Making it 131 causes it to install and reboot the computer all before a user can log on. After the computer is done with the double reboot it's good to go.


Need Your Help

TabControl with different Views and ViewModels

wpf mvvm view viewmodel tabcontrol

Right now, my application has 1 TabControl in the MainWindow. I have about 10 TabControls and each TabControl has about 25-50 Controls so the XML code is pretty big and is very slow in editing even...

How can I force including a header, always?

c++ header include codeblocks

I have been working in Visual Studio on a project and had a header file which I included in every other header file using Project Properties -> C/C++ -> Advanced -> Forced Include File. How do I do...