rundll32 printui.dll,PrintUIEntry A4 Preferences

G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.print_fax (More info?)

I have create a scipt to auto create and install printers for
our XP Deployment. The script works fine but I need to see the preferences
for the printers at least set them to A4 because after I have run my script
every printer defaults to "Letter"

How can I do this. Have searched the Web but can't seem to find out how this
is done.

Also How can I set additional Printer preferences such as what trays to add
etc.

I know when I run rundll32 printui.dll,PrintUIEntry /? I get help and can
see that /Ss option Store Printer Settings into a file. This sounds like what
I need but what syntax do I put into the file. Do I just put in A4 etc ???

Here is a copy of my script. At the University here we don't use Printer
servers eveywhere we print directly to the IP address and this works okay but
eventually we will use Print Servers much easier I know.

My Script

************************************************************
@echo off
cls

Echo * Auto Installer Script for ITS Printers Only *
echo:
echo:
echo:

Echo * Creating Standard TCP/IP Printer Ports on Local Machine *
echo:
echo:
echo:

:: ITS Lexmark Optra T610 (Ground Floor Bld 17)
reg import tcp130.130.69.190.reg
:: ITS Ricoh 1022 (Ground Floor Bld 17)
reg import tcp130.130.69.96.reg
:: ITS HP Laserjet 8150 (Level 2 Bld 17)
reg import tcp130.130.69.154.reg
:: ITS Ricoh 1035 (Level2 Bld 17)
reg import tcp130.130.69.86.reg
:: ITS / SPU HP Laserjet 4100
reg import tcp130.130.70.127.reg
If %errorlevel% EQU 1 CLS && Echo Error importing registry file && Goto End
If %errorlevel% EQU 0 CLS && Echo Registry Import Successful && Goto Spooler
:END

:Spooler
:: Stop and Start Printer Spooler Service
net stop spooler
net start spooler


@echo Off
cls
:echo
:echo
Echo *** Installing and configuring Printer Drivers *******
:echo

:Install_Pdriver1
@echo Off
cls
echo:
echo:
Echo ***** Installing HPLaser Jet 8150 Driver ***********
rundll32 printui.dll,PrintUIEntry /y /if /b "ITS HPLaserJet 8150 L2 Bld 17"
/f %windir%\inf\ntprint.inf /r "IP_130.130.69.154" /m "HP LaserJet 8100
Series PCL" /z >nul
If NOT %errorlevel% EQU 1 CLS && Echo Print Driver Installation Successful
&& Goto Install_Pdriver2
:END

:Install_Pdriver2
@echo off
cls
:echo
:echo
Echo ******* Installing Ricoh 1022 Driver *****************

rundll32 printui.dll,PrintUIEntry /if /b "ITS L1 Ricoh 1022" /f
%windir%\inf\ricoh1022\oemsetup.inf /r "IP_130.130.69.96" /m "RICOH Aficio
1022 PCL 6" /z
If NOT %errorlevel% EQU 0 CLS && Echo Print Driver Installation Successful
&& Goto Install_Pdriver3
:END

:Install_Pdriver3
@echo off
cls
:echo
:echo
Echo **************** Installing Lexmark T610 Driver **********************
rundll32 printui.dll,PrintUIEntry /if /b "ITS L1 Lexmark T610" /f
%windir%\inf\lexmarkt610\lxopt61x.inf /r "IP_130.130.69.190" /m "Lexmark
Optra T610" /z
If NOT %errorlevel% EQU 0 CLS && Echo Print Driver Installation Successful
&& Goto Install_Pdriver4
:END
 

coza456

Distinguished
Jan 20, 2009
2
0
18,510
Just do a registry hack in HKEY_CURRENT_USER\Printers\DevModePerUser
This worked for me.


1. In printer properties make the changes to the paper size and whatever else.
2. Export the registry entry
3. Apply it with the GPO.


hope this helped.


 

SimonSaysYes

Distinguished
Feb 19, 2009
2
0
18,510
Hey, Coza.

I've been trying, with your solution, to set printer preferences as the user logs in, using the GPO.

I use a batch file to install the printer, then a registry entry to set the preferences I entered manually, by
going to "Printers and Faxes" and changing properties.

However, when I install the printer, it still gives me the wrong type of supplied paper (Automatically assign) instead of the format I'm looking to use.

The printer is supposed to have three trays, but when installed and given the registration, it only shows two installed...

Perhaps I'm just not doing things right?

If you could please help me on this, it would be greatly appreciated.
 

coza456

Distinguished
Jan 20, 2009
2
0
18,510
Pretty much all setting changes you make to the printer driver is stored in the registry at that location. Did you deploy it as a user or computer?
 

SimonSaysYes

Distinguished
Feb 19, 2009
2
0
18,510
Okay.

I deployed it as a user. However, this user is administrator with all the rights to printers.
I know we are using an iPrint server, but this printer is installed outside of the boundaries of the iPrint server.
Other printers are loaded directly from it.

Are you saying I should do this process from a server that has Active Directory installed?