Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

driver

wix

inf

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.

like image 632
mmr Avatar asked Jul 29 '09 00:07

mmr


People also ask

How do I install .inf drivers?

Right-Click InstallIn Windows Explorer, select and hold (or right-click) the INF file name. A shortcut menu will appear. Select Install.


1 Answers

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

like image 194
Shay Erlichmen Avatar answered Oct 03 '22 16:10

Shay Erlichmen