- 19 Mar 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
Uniprint Suite - How can I apply default printer settings to the Popup printer with a distribution Package
- Updated on 19 Mar 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
How can I apply default printer settings to a Popup printer when deploying a distribution package?
To apply default settings on a Popup printer deployed via a distribution package, first configure the desired settings on the printer object corresponding to the Spool Queue for which you will be generating packages. Then select "Yes" for Copy Printer Settings on the Device tab of the Spool Queues context in Pharos Administrator. When a distribution package creates a printer object for this queue on a client PC, it will attempt to give the new printer the same settings as the Spool Queue.
However, the Copy Printer Settings property does not work for all printer drivers, as the mechanism for applying printer settings varies. If default settings are not copied to the printer on client PCs, you will need to create a Custom Module to copy the settings:
Create and configure Spool Queue in Pharos Administrator. Be sure to configure the Popup Printer Name on the Device tab.
Generate the package for this Spool Queue from the Package Definitions context.
Install the package on a client machine and configure it with the settings you want, e.g. default paper size, default color mode.
On a client machine run the following command (replace PopupPrinterName with the name of the Popup printer you just installed - leave the quotes):
RUNDLL32 PRINTUI.DLL,PrintUIEntry /Ss /n "PopupPrinterName" /a c:\printersettings.dat
Create a batch file called SetPrinter.bat in the same directory as printersettngs.dat, which is C:\. In this batch file add the following command (replace PopupPrinterName with the name of the Popup printer you just installed - leave the quotes):
RUNDLL32 PRINTUI.DLL,PrintUIEntry /Sr /n "PopupPrinterName" /a c:\Progra~1\pharos\temp\printersettings.dat
Copy these files to a directory on your principal server.
On your principal server, use WinRAR to create a zip file with these two files, giving the zip file the same name as the Popup printer to identify it. Once the zip file is created, open it with WinRAR. Make the zip file self-extracting by clicking the SFX button, configuring the following settings:
In the advanced SFX options on the general tab set “Path To Extract” as C:\Progra~1\Pharos\temp\.
On the General tab set “Run after extraction” as SetPrinter.bat.
On the Modes tab check the “Hide all radio button” and the “Overwrite all files” radio button.
Store the resulting exe file on the principal server in the directory C:\Program Files\Pharos\Bin\Shared\. Delete the original .dat, .bat and .zip files.
In Pharos Administrator create a Custom Module with the same name as the Popup printer.
For the Filename setting, browse for the exe file you just created and select that.
For the Module Behavior property, make sure “Continue install if module fails” and “Module does not write results.txt file” are checked.
Delete the package originally created and recreate it, but do not build the package yet. Add the newly created Custom Module to this package and build the package.
Install the package on your client machines.
Note: In step 4 it may be required to use the PrinterData flag at the end of the command if there is some issue such as user profile information being copied as well. The flag is "d" at the end of the command, resulting in a command that looks like this:
RUNDLL32 PRINTUI.DLL,PrintUIEntry /Ss /n "PopupPrinterName" /a c:\printersettings.dat d
If you are still unable to apply default printer settings for the print driver you are using, you will need to contact the printer manufacturer for advice on how to apply default settings. This functionality has been tested in Windows 2000, Windows XP, and Windows 7. The functions are not available in Windows Vista.