[wix-users] How to install 2 components with same file content with one difference

Marc Beaudry mbeaudry at matrox.com
Thu Mar 25 14:08:26 PDT 2021


Hello Wix-Users

I am looking at different options on how to install the same Windows driver
on both Server 2016 and Windows 10. The installation part works well, but
Server 2016 does NOT offer the same functionality to uninstall.

Before writing a CA to uninstall a driver on Server 2016 which will use
SetupDiRemoveDevice from the SetAPI, I was wondering if I can do this using
purely wix functionality.

- difx:driver works well on server 2016 but is deprecated in the later
versions of Windows 10. Under Windows 10 I now use a CA that calls
DiUninstallDriver from newdev.dll, that uses a reference INF, This is not
supported in server.

So here is my plan, but I don't think Wix supprts this. Ideally I would have
one component that install on both OSes then on Windows 10 have my CA run
and Server 2016 have difx run based on the one component, but from what I
understand it's not how difx works, it needs to be in its own component.

Any advice?

   <DirectoryRef Id='INSTALLFOLDER'>
      <Directory Id="DriverFolder" Name="MyInstaller" >

        <Component Id='Windows10Driver'   Guid='Place GUID here'
Win64="yes">
         // All my driver files listed here
          <File Id='---'  Name='DriverFiles.sys' DiskId='3'
Source='PathToMyFiles\DriverFiles.sys' KeyPath='no'/>	
          <Condition>ISWINDOWS10 = 1</Condition>
        </Component>

        <Component Id='WindowsSrv2016Driver'   Guid='Place GUID here'
Win64="yes">
         // All my driver files listed here (SAME FILES AS ABOVE)
          <File Id='---'  Name='DriverFiles.sys' DiskId='3'
Source='PathToMyFiles\DriverFiles.sys' KeyPath='no'/>	
          <difx:Driver AddRemovePrograms="no" Legacy="yes"
PlugAndPlayPrompt="no" Sequence='1' />
          <Condition>ISSERVER2016 = 1</Condition>
        </Component>

      </Directory>
    </DirectoryRef>

Thanks for your help,
Marc
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/



More information about the wix-users mailing list