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

允我心安 提交于 2019-12-03 11:55:46

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/1197514/how-do-i-use-wix-to-deploy-an-inf-based-usb-driver

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!