WIX Installer for a INF based printer Driver
Asked Answered
L

1

6

I am trying to make a installer for a printer driver, Using WIX

I have

  • some Dlls
  • a *.cat file
  • a *.gdp file
  • an *.inf file

I was thinking about using the INF to deploy the driver but don't know how to implement it.

I sow this Question too,(possibly duplicates) but as a beginner i could't completely understand how to do it.

Am i need to copy those DLLs and other files to the relevant folders by my self and Write Registry. Or is their any easy way to use INF file to do the task by WIX's engine? if it is, can any one teach me steps which I should follow?


I Tried Copying all necessary files to a folder

  <Component Id="PRNDRV_cat" Guid="{4fba0d21-64bb-458d-9b78-23aed7a39d14}" Directory = "PrinterFolder">
    <difx:Driver Legacy='yes' />
      <File Id="Catalog" Name="sielprndrv.cat" Source="Printer\prndrv.cat" />
      <File Id="DataBase" Name="SIELPRNDRV.gpd" Source="Printer\PRNDRV.gpd" />
      <File Id="Info" Name="SIELPRNDRV.inf" KeyPath="yes" Source="Printer\PRNDRV.inf" />
      <File Id="ini" Name="SIELPRNDRV.ini" Source="Printer\PRNDRV.ini" />
  </Component>

And compiled with following command

candle -ext WixDifxAppExtension SielDrivers.wxs
light -ext WixUIExtension -ext WixDifxAppExtension SielDrivers.wixobj difxapp_x64.wixlib -o Setup.msi

After installing, I can see it has listed on the 'Programs and Features', but didn't add in to 'Devices and Printers' as a printer.

What have i missed?

Leeuwenhoek answered 7/7, 2017 at 3:59 Comment(0)
R
1

You should check setupapi.dev.log or setupapi.app.log.
You may know error code.
You can find logs at %SystemRoot%\inf.
https://learn.microsoft.com/en-us/windows-hardware/drivers/install/setupapi-device-installation-log-entries


Is it succeed when you use "Add a printer" button in "Devices and Printers" ?
If not, you should check driver package.
You can copy Dlls to use INF CopyFiles directive, and can register Dlls to use INF RegisterDlls directive.

Ralphralston answered 13/7, 2017 at 1:21 Comment(1)
The problem was in the *.inf file, it was supposed to have a device ID of the device connected. however install using "control panel -> Add Printer" , does not requires a device Id, don't no why. but adding the correct device ID solved my problem. thank you for the help.Leeuwenhoek

© 2022 - 2024 — McMap. All rights reserved.