Automatic account creation is now enabled. Captcha authentication required for account creation and editing unless you are trusted here.

DIFxApp

From WiX Wiki at MindCapers

Jump to: navigation, search

DPInst.exe is the round about way of doing this when using WiX.

Specifically, DIFxApp is the easies way to install drivers correctly using WiX.

If you have a single .inf file that describes the port monitor and then describes the printer driver, then you need only one Component for the 2 drivers in WiX.

If you have 2 .inf files, one to describe the Port driver, and the other to describe the printer driver, then you will have 2 components, one for each inf and accompanying driver files. Make sure each inf file is in its own directory once copied to the system, and is accompanied by all of the files that it needs to install.

Read the docs on "Component Element" and look specifically at the DIFxApp specific attributes that you must add to make that component get installed correctly.

You will then include the ComponentRef(s) in the Feature that you want them to be installed with.

Be sure to use WiX v2 to link to the difxapp.wixlib binaries (because there is a problem with v3), like this:

lightArgs: "<projectname>.wixobj" "C:\WINDDK\6000\redist\DIFx\DIFxApp\English\WixLib\x86\difxapp.wixlib" -out "<projectname>.msi" <extensions>


ClassFilter.wxs is a great example of this given in the DDK: C:\WinDDK\6000\src\setup\DIFxApp\WiXLib


Here is some sample code of what I am describing:

<?xml version="1.0" encoding="utf-8"?>
<!--
    lightArgs: "<projectname>.wixobj"
    "C:\WINDDK\6000\redist\DIFx\DIFxApp\English\WixLib\x86\difxapp.wixlib" -out
    "<projectname>.msi" <extensions>
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
  <Product UpgradeCode="xxxx" Name="ClassFilter" Id="xxxx" Version="1.0.0"
           Manufacturer="Microsoft" Language="1033">
    <Package Id="xxx" Manufacturer="Microsoft" InstallerVersion="200"
             Platforms="Intel" Languages="1033" Compressed="yes" SummaryCodepage="1252" />
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="DRVDIR" Name="Drivers">
        <Directory Id="DRVDIR_PORT" Name="PORT" SourceName=".">
          <Component Id="C__Driver1" Guid="xxx" DriverForceInstall="no"
                     DriverSequence="0">
            <File Id="DRV1_INF" Name="PortDrv.INF" Vital="yes" KeyPath="yes"
                  DiskId="1" />
            <File Id="DRV1_CAT" Name="Port.CAT" Vital="yes" KeyPath="no"
                  DiskId="1" />
            <File Id="DRV1_SYS" Name="Port.SYS" Vital="yes" KeyPath="no"
                  DiskId="1" />
          </Component>
        </Directory>
        <Directory Id="DRVDIR_PRINTER" Name="PRINTER" SourceName=".">
          <Component Id="C__Driver2" Guid="xxx" DriverForceInstall="no"
                     DriverSequence="0">
            <File Id="DRV2_INF" Name="PrntrDrv.INF" Vital="yes"
                  KeyPath="yes" DiskId="1" />
            <File Id="DRV2_CAT" Name="Printer.CAT" Vital="yes" KeyPath="no"
                  DiskId="1" />
            <File Id="DRV2_SYS" Name="Printer.SYS" Vital="yes" KeyPath="no"
                  DiskId="1" />
          </Component>
          <Directory Id="ProgramMenuFolder" Name="." SourceName="USER'S~1"
                     LongSource="User's Programs Menu" />
        </Directory>
      </Directory>
      <Directory Id="DesktopFolder" Name="." SourceName="USER'S~2"
                 LongSource="User's Desktop" />
    </Directory>
    <Feature Id="DefaultFeature" Level="1"
             ConfigurableDirectory="TARGETDIR">
      <ComponentRef Id="C__Driver1" />
      <ComponentRef Id="C__Driver2" />
    </Feature>
    <Media Id="1"/>
    <UI />
  </Product>
</Wix>

DifxTools WiX Example

www.microsoft.com/whdc/driver/install/difxtools.mspx

Personal tools