Morning you beautiful people!
My sysadmin as decided that we should do everything with .msi and I am stuck trying to make a wix project to install .inf based drivers.
I saw some post explaining briefly how to do this like:
WIX Installer for a INF based printer Driver
However, I would really like a complete example (whole slns file) to make me understand the structure I need to do. Right now it doesn't even compile. Here's the content of my product.wxs (PS:Sorry for the formatting mess):
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="DriversTest" Language="1033" Version="1.0.0.0"
Manufacturer="" UpgradeCode="8caa9c0d-c692-4aa6-9267-a13577f51cb6">
<Package InstallerVersion="200" Compressed="yes"
InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is
already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="DriversTest" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="DriversTest" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<!-- TODO: Remove the comments around this Component element and the
ComponentRef below in order to add resources to this installer. -->
<!-- <Component Id="ProductComponent"> -->
<!-- TODO: Insert files, registry keys, and other resources
here. -->
<!-- </Component> -->
</ComponentGroup>
</Fragment>
</Wix>
<Component Id="google-usb" Guid="{4fba0d21-64bb-458d-9b78-23aed7a39d14}"
Directory = "C:\drivers-folder\google">
<difx:Driver Legacy='yes' />
<File Id="Catalog" Name="androidwinusba64.cat"
Source="androidwinusba64.cat" />
<File Id="Info" Name="android_winusb.inf" KeyPath="yes"
Source="android_winusb.inf" />
</Component>
<Component Id="google-usb" Guid="{4fba0d21-64bb-458d-9b78-23aed7a39d14}" Directory = "C:\drivers-folder\google">
<difx:Driver Legacy='yes' />
<File Id="Catalog" Name="androidwinusba64.cat" Source="androidwinusba64.cat" />
<File Id="Info" Name="android_winusb.inf" KeyPath="yes" Source="android_winusb.inf" />
</Component>
I then proceed to call as a batch file this:
@ECHO OFF
ECHO ------------Generating drivers install----------------
"%WIX%bin\candle" -ext WixDifxAppExtension *.wxs -o obj\ "%WIX%bin\light" -ext WixUIExtension -ext WixDifxAppExtension *.wixobj difxapp_x64.wixlib -o bin\google-usb.msi
PAUSE
Which fails because of this error:
Product.wxs C:\test\DriversTest\DriversTest\DriversTest\Product.wxs(32) : error CNDL0104 : Not a valid source file; detail: There are multiple root elements. Line 32, position 2. light.exe : error LGHT0103 : The system cannot find the file '*.wixobj' with type 'Source'. Press any key to continue . . .
I could really use a hand. I am a total noob at this and I think I need some guidance. I suck at XML.