问题
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