How do I use WiX to deploy an INF-based USB driver
Asked Answered
D

2

15

This question could be considered a duplicate of:

How do I deploy a .inf based driver?

Except that I want to do that entirely in the installer, not with a separate program.

There's supposed to be an example downloadable here: http://msdn.microsoft.com/en-us/library/dd163212.aspx

But there's no download link on that page.

The driver structure is very simple, just an inf and an sys. I've tried this:

  <Directory Id='SystemFolder' Name='System32'>
    <Directory Id='DriversFolder' Name='Drivers'/>
  </Directory>

...

<DirectoryRef Id="DriversFolder">
  <Driver Id="cyusb" Guid="*">
    <File Id="cyusb.inf" Source="..\Includes\cyusb.inf" />
  </Driver>
  <Driver Id="cyusb_sys" Guid="*">
    <File Id="cyusb.sys" Source="..\Includes\cyusb.sys" />
  </Driver>
</DirectoryRef>

with the 'wixdifxappextension.dll' and difxapp_x86 both included as references to my project, and the 'driver' tag isn't recognized. If I use 'component' instead of 'driver', then the resulting file isn't actually recognized as a driver, and I have to do a manual installation.

What am I doing wrong here? Or will I have to write yet another program to make this installer work? This is in Wix 3.0.

Donny answered 29/7, 2009 at 0:40 Comment(0)
C
12

According to the manual, <Driver> should be under <Component>, and your Wix should look something like:

<DirectoryRef Id="DriversFolder" FileSource="..\Includes\">
  <Component Id="MyDriver" Guid="[PUT GUID]">
    <Driver Legacy='yes' />
    <File Id="cyusb.inf" Vital="yes" />
    <File Id="cyusb.sys" Vital="yes" />
  </Component>
</DirectoryRef>

More information from this guy's blog

Certificate answered 3/8, 2009 at 20:10 Comment(0)
E
3

I also had the same problem. The following worked for me.

Added to the project 2 references:

  • WixDifxAppExtension
  • difxapp_x64.wixlib

Inside the Wix node of .wxs file, I added the attribute:

xmlns:difxapp='http://schemas.microsoft.com/wix/DifxAppExtension'

Looks like it needs to refer and use the difxapp namespace.

Inside the Component that includes the .inf file, I added:

<difxapp:Driver PlugAndPlayPrompt="no"/>
Echikson answered 19/12, 2019 at 11:18 Comment(1)
WixDifxAppExtension and difxapp_x64.wixlib could be found in Program Files (x86)\Wix ToolSet v.3.11\bin (use Add Reference dialog of Visual Studio)Flowerpot

© 2022 - 2024 — McMap. All rights reserved.