如何使用WiX部署基于INF的USB驱动程序 [英] How do I use WiX to deploy an INF-based USB driver

查看:135
本文介绍了如何使用WiX部署基于INF的USB驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题可被视为以下项目的重复项:

This question could be considered a duplicate of:

How do I deploy a .inf based driver?

除了我想完全在其中执行此操作外,如何部署基于.inf的驱动程序?安装程序,而不需要单独的程序。

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

应该可以在此处下载示例:
http://msdn.microsoft.com/en-us/library/dd163212.aspx

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.

驱动程序结构非常简单,只有一个inf和一个sys。我已经尝试过:

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>

带有 wixdifxappextension.dll和difxapp_x86都作为对我的项目的引用,并且包含驱动程序 '标签无法识别。如果我使用组件而不是驱动程序,则生成的文件实际上未被识别为驱动程序,因此必须手动安装。

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.

什么我在这里做错了吗?还是我必须编写另一个程序才能使此安装程序正常工作?这是在Wix 3.0中。

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.

推荐答案

根据手册 < Driver> 应该在 < Component> ,并且您的Wix应该类似于:

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>

来自这家伙的博客

这篇关于如何使用WiX部署基于INF的USB驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆