[wix-users] Wix Failing to install driver

Jon Earle earlej at hotmail.com
Tue Mar 21 13:29:20 PDT 2017

Thanks for the hints, Phil.  I have been on this for much of the day.

I removed the entries based on 1) and 2).

3) I ran 'pnputil -e' and it printed out a huge list of entries, most pertaining to Intel drivers and devices... most also looked identical.  None were my device.

4) I did enable the verbose logging and rebooted before trying to install the driver.  This is the logged output of that attempt:

[Device Install Log]
     OS Version = 6.3.9600
     Service Pack = 0.0
     Suite = 0x0110
     ProductType = 3
     Architecture = amd64


[Boot Session: 2017/03/21 11:27:26.484]

>>>  [Device Install (Hardware initiated) - USB\VID_04B9&PID_F280\3147.cf62.0706.8687]
>>>  Section start 2017/03/21 11:27:57.977
     ump: Creating Install Process: DrvInst.exe 11:27:58.040
     ndv: Setting device parameters...
     dvi: {Build Driver List} 11:27:58.369
     dvi:      Searching for hardware ID(s):
     dvi:           usb\vid_04b9&pid_f280&rev_0000
     dvi:           usb\vid_04b9&pid_f280
     dvi:      Searching for compatible ID(s):
     dvi:           usb\class_ff&subclass_00&prot_00
     dvi:           usb\class_ff&subclass_00
     dvi:           usb\class_ff
     dvi:      Searching for location path(s):
     dvi:           pciroot(0)#pci(1d00)#usbroot(0)#usb(1)#usb(1)
     dvi:           acpi(_sb_)#acpi(pci0)#acpi(ehc1)#usbroot(0)#usb(1)#usb(1)
     dvi:      Enumerating INFs from path list 'C:\Windows\INF'
     inf:      Cache Miss: INF 'C:\Windows\INF\oem1.inf' could not be restored from driver store. Error (0x00000003)
!    inf:      Unable to load INF: 'C:\Windows\System32\DriverStore\FileRepository\TroublesomeUSBDevice.inf_amd64_a1a4a56e5081c229\TroublesomeUSBDevice.inf'(00000003)
!    inf:      Error 3: The system cannot find the path specified.
     inf:      Cache Hit: INF 'C:\Windows\System32\DriverStore\FileRepository\TroublesomeUSBDevice.inf_amd64_a1a4a56e5081c229\TroublesomeUSBDevice.inf' could not be loaded. Error (0x00000003)
     inf:      Searched 1 potential matches in published INF directory
     dvi: {Build Driver List - exit(0x00000000)} 11:27:58.874
     dvi: {DIF_SELECTBESTCOMPATDRV} 11:27:58.874
     dvi:      No class installer for 'Our Troublesome Device'
     dvi:      No CoInstallers found
     dvi:      Default installer: Enter 11:27:58.889
     dvi:           {Select Best Driver}
!    dvi:                Selecting driver failed(0xe0000228)
     dvi:           {Select Best Driver - exit(0xe0000228)}
!    dvi:      Default installer: failed!
!    dvi:      Error 0xe0000228: There are no compatible drivers for this device.
     dvi: {DIF_SELECTBESTCOMPATDRV - exit(0xe0000228)} 11:27:58.889
     ndv: {Core Device Install} 11:27:58.889
!    ndv:      Installing NULL driver!
     dvi:      Set selected driver complete.
     dvi:      {DIF_ALLOW_INSTALL} 11:27:58.889
     dvi:           No class installer for 'Our Troublesome Device'
     dvi:           Default installer: Enter 11:27:58.889
     dvi:           Default installer: Exit
     dvi:      {DIF_ALLOW_INSTALL - exit(0xe000020e)} 11:27:58.905
     dvi:      {DIF_REGISTER_COINSTALLERS} 11:27:58.905
     dvi:           No class installer for 'Our Troublesome Device'
     dvi:           Default installer: Enter 11:27:58.905
     dvi:                Co-installers registered.
     dvi:           Default installer: Exit
     dvi:      {DIF_REGISTER_COINSTALLERS - exit(0x00000000)} 11:27:58.905
     dvi:      {DIF_INSTALLDEVICE} 11:27:58.905
     dvi:           No class installer for 'Our Troublesome Device'
     dvi:           No CoInstallers found
     dvi:           Default installer: Enter 11:27:58.905
!    dvi:                Installing NULL driver!
     dvi:                Install Null Driver: Removing device sub-tree. 11:27:58.983
     dvi:                Install Null Driver: Removing device sub-tree completed. 11:27:59.061
     dvi:                Install Null Driver: Restarting device. 11:27:59.311
     dvi:                Install Null Driver: Restarting device completed. 11:27:59.358
     dvi:                Writing common driver property settings.
     dvi:                Install Device: Starting device. 11:27:59.374
     dvi:                Install Device: Starting device completed. 11:27:59.497
     dvi:           Default installer: Exit
     dvi:      {DIF_INSTALLDEVICE - exit(0x00000000)} 11:27:59.497
     ndv:      Device install status: 0xe0000203
     ndv:      Performing device install final cleanup...
!    ndv:      Queueing up error report since device installation failed...
     ndv: {Core Device Install - exit(0xe0000203)} 11:27:59.497
     ump: Server install process exited with code 0xe0000203 11:27:59.497
<<<  Section end 2017/03/21 11:27:59.497
<<<  [Exit status: FAILURE(0xe0000203)]

>>>  Section start 2017/03/21 12:41:09.769
      cmd: C:\Windows\System32\svchost.exe -k LocalSystemNetworkRestricted
     dvi: {Delete DEVICE}
     dvi:      Device Instance uninstalled.
     dvi: {Delete DEVICE exit (0x00000000)}
<<<  Section end 2017/03/21 12:41:09.784
<<<  [Exit status: SUCCESS]

>>>  Section start 2017/03/21 12:41:59.529
      cmd: C:\Windows\System32\svchost.exe -k LocalSystemNetworkRestricted
     dvi: {Delete DEVICE}
     dvi:      Device Instance uninstalled.
     dvi: {Delete DEVICE exit (0x00000000)}
<<<  Section end 2017/03/21 12:41:59.544
<<<  [Exit status: SUCCESS]

There is no oem1.inf in c:\windows\inf and there is no TroublesomeUSBDevice* folder in C:\Windows\System32\DriverStore\FileRepository at the time the installation rolled back.

This driver will install on other Server 2012R2 boxes, it is just this particular one which is causing the problem.

From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Phill Hogland <PhillHogland+wix at gmail.com>
Sent: Monday, March 20, 2017 10:16 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Wix Failing to install driver

While I use DifxAppExtension to install several drivers, it has been a
while since I did the development and I don't have the code handy.  But I
may be able to share a few points.
1) USB drivers are a PnP drivers, so I would not specify Legacy='Yes'.
Just let wix use the default value.
2) I also don't specify Component/@SharedDllRefCount as it is an old
reference counting mechanism which I understood is only useful when a DLL
is being shared between non-msi based setup technologies.  Others may
provide more details.
About Shared Components | Setup & Install by Heath Stewart<https://blogs.msdn.microsoft.com/heaths/2009/12/21/about-shared-components/>
Components are the basic unit of installation in a Windows Installer product. They are installed by one or more features, and can contain any number of ...

3) When a PnP driver is installed, it is always copied to the Driver Store
(on Vista or later) by the PnPManager/Class Installer and then installed
from that location.  Use pnputil.exe (a system tool) to view the driver
store (or clean up entries).  I would never try to create the folder or
copy files directly to the driver store area, as I believe that results in
unsupported behavior.

4) Regarding the failure to copy the driver to the driver store, I would
enable verbose driver setupapi logging and evaluate the setupapi.dev.log
typically in C:\Windows\INF
Setting SetupAPI Logging Levels – Windows 10 hardware dev<https://msdn.microsoft.com/en-us/windows/hardware/drivers/install/setting-setupapi-logging-levels>
You can control the amount of information that is written to the SetupAPI log, either for all device installation applications or for individual device ...

  This behavior of not copying the driver to the driver store usually means
that there is a driver ranking issue, and since you indicated that this
driver is having an issue on this version of the OS, it may be that the
author did not specify that version of the OS as supported when the driver
was code signed.  The verbose setupapi log will tell the story as to the
root cause of the problem.
How Windows Ranks Drivers - msdn.microsoft.com<https://msdn.microsoft.com/en-us/windows/hardware/drivers/install/how-setup-ranks-drivers--windows-vista-and-later->
Windows assigns a rank to a driver that matches a device. The rank indicates how well the driver matches the device. A driver rank is represented by an ...

Overview of the Driver Selection Process - msdn.microsoft.com<https://msdn.microsoft.com/en-us/windows/hardware/drivers/install/overview-of-the-driver-selection-process>
Windows represents a driver as a driver node, which includes all the software support for a device, such as any services, device-specific co-installers ...

Driver Rank Information in the SetupAPI Log<https://msdn.microsoft.com/en-us/windows/hardware/drivers/install/driver-rank-information-in-the-setupapi-log>
Windows uses a signature indicator to represent the signature type. Windows saves this information in a driver store database for internal use.

On Mon, Mar 20, 2017 at 5:14 PM, Jon Earle <earlej at hotmail.com> wrote:

> We have a Windows Server 2012R2 box, onto which I am attempting to install
> our product. One installation option of our product, is to install a USB
> driver for our device. The server is a real box (not a VM with passthrough)
> with the USB device attached.
> The installation is failing for this particular device; other USB drivers
> for unrelated devices can be installed without issue.  It is also failing
> on this particular server, others, incl VMs, work without issue.  Installer
> built with WiX 3.10.3.
> The relevant wix code.  The actual code in our fragment file contains
> actual GUID values (not '*').
>     <Fragment>
>         <DirectoryRef Id="INSTALLDIR">
>             <Directory Id="$(var.DriverID)" Name="TroublesomeUSBDriver">
>                 <Component Id="USBDriver_Driver" Guid="*" KeyPath="yes"
> SharedDllRefCount="yes" Win64="$(var.Win64)">
>                     <Driver AddRemovePrograms="no" DeleteFiles="yes"
> Legacy="yes" PlugAndPlayPrompt="no" Sequence="1" xmlns="http://schemas.
> microsoft.com/wix/DifxAppExtension" />
>                     <CreateFolder/>
>                 </Component>
>                 <!-- INF file -->
>                 <Component Id="USBDriver_inf_Win7" Guid="*" KeyPath="yes"
> SharedDllRefCount="yes" Win64="$(var.Win64)">
>                     <File Id="TroublesomeUSBDevice.inf_win7"
> Name="TroublesomeUSBDevice.inf" Vital="no" DiskId="1"
> Source="$(var.DRIVER_SRC_DIR)\TroublesomeUSBDevice.inf" />
>                 </Component>
>                 <!-- catalog file -->
>                     <Component Id="USBDriver_cat_Win7" Guid="*"
> KeyPath="yes" SharedDllRefCount="yes" Win64="$(var.Win64)">
>                         <File Id="TroublesomeUSBDevice_.cat_win7"
> Name="TroublesomeUSBDevice_.cat" Vital="no" DiskId="1"
> Source="$(var.DRIVER_SRC_DIR)\TroublesomeUSBDevice_.cat" />
>                     </Component>
>                 <!-- x86 system file -->
>                 <Directory Id="X86_$(var.G5_ID)" Name="x86">
>                     <Component Id="USBDriver_sys32_Win7" Guid="*"
> KeyPath="yes" SharedDllRefCount="yes" Win64="$(var.Win64)">
>                         <File Id="TroublesomeUSBDevice.sys32_win7"
> Name="TroublesomeUSBDevice.sys" Vital="no" DiskId="1"
> Source="$(var.DRIVER_SRC_DIR)\X86\TroublesomeUSBDevice.sys" />
>                     </Component>
>                 </Directory>
>                 <!-- x64 system file -->
>                 <Directory Id="AMD64_$(var.G5_ID)" Name="AMD64">
>                     <Component Id="USBDriver_sys64_Win7" Guid="*"
> KeyPath="yes" SharedDllRefCount="yes" Win64="$(var.Win64)">
>                         <File Id="TroublesomeUSBDevice.sys64_win7"
> Name="TroublesomeUSBDevice.sys" Vital="no" DiskId="1"
> Source="$(var.DRIVER_SRC_DIR)\AMD64\TroublesomeUSBDevice.sys" />
>                     </Component>
>                 </Directory>
>             </Directory>
>     ...
>     <Fragment>
>         <ComponentGroup Id="USBDriver_and_Tools">
>             <ComponentRef Id="USBDriver_inf_Win7" />
>             <ComponentRef Id="USBDriver_sys64_Win7" />
>             <ComponentRef Id="USBDriver_sys32_Win7" />
>             <ComponentRef Id="USBDriver_cat_Win7" />
>             <ComponentRef Id="USBDriver_Driver" />
> The driver is failing with:
>     DIFXAPP: ENTER: InstallDriverPackages()
>     DIFXAPP: INFO: 'CustomActionData' property 'DIFxApp Version' is '2.1'.
>     DIFXAPP: INFO: 'CustomActionData' property 'UI Level' is '5'.
>     DIFXAPP: INFO: 'CustomActionData' property 'componentId' is
> '{80619707-A4B1-4049-8DBE-D5C682D44079}'.
>     DIFXAPP: INFO: 'CustomActionData' property 'componentPath' is
> 'C:\Program Files\MyCompany\MyProduct\TroublesomeUSBDriver\'.
>     DIFXAPP: INFO: 'CustomActionData' property 'flags' is 0x1E.
>     DIFXAPP: INFO: 'CustomActionData' property 'installState' is '2'.
>     DIFXAPP: INFO: 'CustomActionData' property 'ProductName' is 'Coyote
> Client 7.0.0'.
>     DIFXAPP: INFO: 'CustomActionData' property 'ManufacturerName' is 'Acme
> Inc.'.
>     DIFXAPP: INFO: user SID of user performing the install is
> 'S-1-5-21-2541645536-3375437705-2618122102-500'.
>     DIFXAPP: INFO: opening HKEY_USERS\S-1-5-21-2541645536-3375437705-
> 2618122102-500\Software\Microsoft\Windows\CurrentVersion\DIFxApp\
> Components\{80619707-A4B1-4049-8DBE-D5C682D44079} (User's SID:
> 'S-1-5-21-2541645536-3375437705-2618122102-500') ...
>     DIFXAPP: INFO:   ENTER:  DriverPackageInstallW
> supported on Plug and Play driver on VISTA. Flag will be ignored.
>     DIFXAPP: INFO:   Installing INF file 'C:\Program
> Files\MyCompany\MyProduct\TroublesomeUSBDriver\TroublesomeUSBDevice.inf'
> (Plug and Play).
>     DIFXAPP: INFO:   Could not open file C:\Windows\System32\
> DriverStore\FileRepository\TroublesomeUSBDevice.inf_
> amd64_a1a4a56e5081c229\TroublesomeUSBDevice.inf. (Error code 0x3: The
> system cannot find the path specified.)
>     DIFXAPP: ERROR:  PnP Install failed. (Error code 0x3EE: The volume for
> a file has been externally altered so that the opened file is no longer
> valid.)
>     DIFXAPP: INFO:   Attempting to rollback ...
>     DIFXAPP: INFO:   No devices to rollback
>     DIFXAPP: INFO:   RETURN: DriverPackageInstallW  (0x3EE)
>     DIFXAPP: ERROR: encountered while installing driver package
> 'C:\Program Files\MyCompany\MyProduct\TroublesomeUSBDriver\
> TroublesomeUSBDevice.inf'
>     DIFXAPP: ERROR: InstallDriverPackages failed with error 0x3EE
>     DIFXAPP: RETURN: InstallDriverPackages() 1006 (0x3EE)
>     CustomAction MsiInstallDrivers returned actual error code 1603 (note
> this may not be 100% accurate if translation happened inside sandbox)
>     Action ended 14:38:13: InstallFinalize. Return value 3.
> I have googled the error message and found no answers.  One site suggested
> creating the missing folder (TroublesomeUSBDevice.inf_amd64_a1a4a56e5081c229,
> in this case) and populating it with the content provided (I copied the
> content from another, working instance) and running the install.  I found
> that, that worked, I could install the driver, but, it had an oddball side
> effect where, attempting to uninstall via control panel resulted instead,
> in the app attempting to install again (rather than uninstall).
> Cleaning the system does not help.
> So, primarily, I am trying to understand why it's broken, but, another
> question I have is, why is the driver being installed from a copy-target
> location, vs the installed location?
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/

WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

More information about the wix-users mailing list