rundll and Print Preferences No One replied to first post

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
 
G

Guest

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

Try one of the scripting/vba groups.

Tom
MSMVP
Windows Shell/User


"pbirkle" <pbirkle@discussions.microsoft.com> wrote in message
news:4839BA46-AB84-43E7-978C-EEEEBF929101@microsoft.com...
: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
:
: