Restoring printer settings via printui.dll

P

Paul Griffith

Hello,

I have been trying to automate the installation and setup of printer
from the command line. I can install printers with out any problem by
doing this:

rundll32 printui.dll,PrintUIEntry /if /f %windir%\inf\ntprint.inf /r
"\\pcsrv\printer1" /m "HP LaserJet 4050 Series PCL6"

I can save the printer settings like this:
rundll32 printui.dll,PrintUIEntry /Ss /n "\\pcsrv\printer1" /a "p1.dat"

Then I perform an unattended install of WinXP SP1 and try to restore the
setting using the command:

rundll32 printui.dll,PrintUIEntry /Sr /n "printer" /a "file.dat" 27cdg

The settings don't get restored.

Anyone have any other ideas on automated printer installations from the
commandline using rundll32 printui.dll,PrintUIEntry or any other tool.
I need to have duplex enabled and select as the default.

Thanks
Paul Griffith
 
M

Michael Lueck

Paul Griffith wrote:

Just wondering, is the driver already install when you try to restore the settings? That would help for sure.

Some settings are stored in the current user registry, thus if a System level authority process is restoring the settings you will never see them when you logon to a person's account. Backup and
restore settings from the logged in desktop.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top