[wix-users] Wix Failing to install driver
Jon Earle
earlej at hotmail.com
Mon Mar 20 15:14:33 PDT 2017
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
DIFXAPP: WARNING:DRIVER_PACKAGE_LEGACY_MODE flag set but not 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?
More information about the wix-users
mailing list