Changes
Created page with '== Generic Instructions == Most printer drivers should come packaged with an INF file which describes them. Printui.dll provides a generic method to install these. You'll need t…'
== Generic Instructions ==
Most printer drivers should come packaged with an INF file which describes them. Printui.dll provides a generic method to install these. You'll need to know the name of the printer driver, which you can obtain by examining the INF file. For check conditions, find the name of the driver file it drops, and check (on x86) <code?HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\Your Printer Name Here\Data File</code>. You can obtain this information from the INF file or by examining a computer on which the driver is already installed.
For additional information on how to manipulate printers silently, run <code>rundll32 PrintUI.dll,PrintUIEntry /?</code>. Note that the string <code>PrintUIEntry</code> is case-sensitive.
(Note that if Point and Print is turned on and works correctly in your environment, none of this is probably necessary.)
== Working Examples ==
=== HP Universal Printer Driver ===
<source lang="xml">
<package
id="hpuniv-drivers"
name="HP Universal Printer Driver 4.7"
revision="2"
reboot="false"
priority="0">
<!-- XXX this check is inadequete. At the time I prepared it, WPKG didn't handle
REG_BINARY very well. -->
<!-- Note: the packages only provide x86 drivers, so no other arch are checked -->
<check type="registry" condition="equals" path="HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\HP Universal Printing PS\Data File" value="hpcu083s.ppd" />
<install cmd='rundll32 PrintUI.dll,PrintUIEntry /ia /f "%SOFTWARE%\printerdrivers\hp-universal-v4.7\PS\hpcu083d.inf" /m "HP Universal Printing PS" /q' />
</package>
</source>
=== Ricoh Aficio 2045e ===
<source lang="xml">
<package
id="ricoh-aficio2045e-drivers"
name="Ricoh drivers"
revision="2"
reboot="false"
priority="0">
<!-- XXX this check is inadequete. -->
<!-- Note: the packages only provide x86 drivers, so no other arch are checked -->
<check type="registry" condition="equals" path="HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\Ricoh Aficio 2045e PCL 6\Data File" value="RIC634K.DLL" />
<check type="registry" condition="equals" path="HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\Ricoh Aficio 2045e PS\Data File" value="RAF245E3.PPD" />
<install cmd='rundll32 PrintUI.dll,PrintUIEntry /ia /f "%SOFTWARE%\printerdrivers\ricoh\PCL6\3.1.0.0\disk1\OEMSETUP.INF" /m "RICOH Aficio 2045e PCL 6" /q' />
<install cmd='rundll32 PrintUI.dll,PrintUIEntry /ia /f "%SOFTWARE%\printerdrivers\ricoh\PS\3.0.0\DISK1\RICSETUP.INF" /m "RICOH Aficio 2045e PS" /q' />
</package>
</source>
=== HP Deskjet 5800 series ===
<source lang="xml">
<package
id="hpdj5800-drivers"
name="HP Deskjet 5800 series"
revision="1"
reboot="false"
priority="0">
<!-- XXX this check is inadequete. Wpkg doesn't handle REG_BINARY very well. -->
<!-- Note: the packages only provide x86 drivers, so no other arch are checked -->
<check type="registry" condition="equals" path="HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\hp deskjet 5800 series\Data File" value="hpf4h409.dat" />
<install cmd='rundll32 PrintUI.dll,PrintUIEntry /ia /f "%SOFTWARE%\printerdrivers\lj5800-basic\5800\enu\drivers\win2k_xp\hpf5800k.inf" /m "hp deskjet 5800 series" /q' />
</package>
</source>
[[Category:Silent Installers]]
Most printer drivers should come packaged with an INF file which describes them. Printui.dll provides a generic method to install these. You'll need to know the name of the printer driver, which you can obtain by examining the INF file. For check conditions, find the name of the driver file it drops, and check (on x86) <code?HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\Your Printer Name Here\Data File</code>. You can obtain this information from the INF file or by examining a computer on which the driver is already installed.
For additional information on how to manipulate printers silently, run <code>rundll32 PrintUI.dll,PrintUIEntry /?</code>. Note that the string <code>PrintUIEntry</code> is case-sensitive.
(Note that if Point and Print is turned on and works correctly in your environment, none of this is probably necessary.)
== Working Examples ==
=== HP Universal Printer Driver ===
<source lang="xml">
<package
id="hpuniv-drivers"
name="HP Universal Printer Driver 4.7"
revision="2"
reboot="false"
priority="0">
<!-- XXX this check is inadequete. At the time I prepared it, WPKG didn't handle
REG_BINARY very well. -->
<!-- Note: the packages only provide x86 drivers, so no other arch are checked -->
<check type="registry" condition="equals" path="HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\HP Universal Printing PS\Data File" value="hpcu083s.ppd" />
<install cmd='rundll32 PrintUI.dll,PrintUIEntry /ia /f "%SOFTWARE%\printerdrivers\hp-universal-v4.7\PS\hpcu083d.inf" /m "HP Universal Printing PS" /q' />
</package>
</source>
=== Ricoh Aficio 2045e ===
<source lang="xml">
<package
id="ricoh-aficio2045e-drivers"
name="Ricoh drivers"
revision="2"
reboot="false"
priority="0">
<!-- XXX this check is inadequete. -->
<!-- Note: the packages only provide x86 drivers, so no other arch are checked -->
<check type="registry" condition="equals" path="HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\Ricoh Aficio 2045e PCL 6\Data File" value="RIC634K.DLL" />
<check type="registry" condition="equals" path="HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\Ricoh Aficio 2045e PS\Data File" value="RAF245E3.PPD" />
<install cmd='rundll32 PrintUI.dll,PrintUIEntry /ia /f "%SOFTWARE%\printerdrivers\ricoh\PCL6\3.1.0.0\disk1\OEMSETUP.INF" /m "RICOH Aficio 2045e PCL 6" /q' />
<install cmd='rundll32 PrintUI.dll,PrintUIEntry /ia /f "%SOFTWARE%\printerdrivers\ricoh\PS\3.0.0\DISK1\RICSETUP.INF" /m "RICOH Aficio 2045e PS" /q' />
</package>
</source>
=== HP Deskjet 5800 series ===
<source lang="xml">
<package
id="hpdj5800-drivers"
name="HP Deskjet 5800 series"
revision="1"
reboot="false"
priority="0">
<!-- XXX this check is inadequete. Wpkg doesn't handle REG_BINARY very well. -->
<!-- Note: the packages only provide x86 drivers, so no other arch are checked -->
<check type="registry" condition="equals" path="HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\hp deskjet 5800 series\Data File" value="hpf4h409.dat" />
<install cmd='rundll32 PrintUI.dll,PrintUIEntry /ia /f "%SOFTWARE%\printerdrivers\lj5800-basic\5800\enu\drivers\win2k_xp\hpf5800k.inf" /m "hp deskjet 5800 series" /q' />
</package>
</source>
[[Category:Silent Installers]]