Moving Printers from NT4 to Windows 2003 on workstations

  • Thread starter Thread starter WooYing
  • Start date Start date
W

WooYing

Is there a script that will allow me to point their exist printer from a NT4
Print Server to a new Print Server on Windows 2003. The printer names will
remind the same all I am looking to do is just repoint their machines
locally to point to the new server. Please advise. Thank you.
 
WooYing said:
Is there a script that will allow me to point their exist printer from a NT4
Print Server to a new Print Server on Windows 2003. The printer names will
remind the same all I am looking to do is just repoint their machines
locally to point to the new server. Please advise. Thank you.


First find and download Chgprint.exe. I believe it was/is available
within a resource kit. You can use the same file for Windows 2000 and
Windows XP workstations. Windows NT4 workstations require a different
version of the file. Copy the CHGPRINT executable for 2000/xp to a
directory on a file server and copy the CHGPRINT executable for NT4 to
a different directory on the same file server. Then find and download
defptr.exe (also available within resource kits or from microsoft.com)
and place a copy in both the NT4 directory and the 2000/XP directory.
Then you need to create a TRANSLATEPRINTER.TXT file. Here's what that
file must contain. On the very first line of test type the full path
to a printer on the old NT4 print server. For example:

\\oldprintserver\printqueue1name

Then hit the "tab" button and type the name of the path of the new
print queue you want workstations to change to. For example:

\\newprintserver\printqueue1name

So the first whole line in notepad will look like this:

\\oldprintserver\printqueue1name \\newprintserver\printqueue1name

Remember that's a tab, not spaces between the two. Then on the second
line do the next printer. Type out all of your printers one-by-one
exactly how you want them to be "translated".

\\oldprintserver\printqueue2name \\newprintserver\printqueue2name
\\oldprintserver\printqueue3name \\newprintserver\printqueue3name
\\oldprintserver\printqueue4name \\newprintserver\printqueue4name

Copy this saved TRANSLATEPRINTER.TXT file to the directory where
CHGPRINT.EXE resides (both NT4 and 2000/XP if you have both).

Then try the following within a script:

-----------------------------------
start of script
-----------------------------------

::Set the Purdy Colors First
color 3f

::Determining Operating System
for /F "tokens=3 delims= " %%i in ('ver') do (set winver=%%i)
md %temp%\chgprint
if "%winver%"=="2000" goto Win2k
if "%winver%"=="Version" goto WinNT
if "%winver%"=="XP" goto WinXP

:WinNT
copy \\fileserver\share\chgprint\WinNT\*.* %temp%\chgprint
goto Logfile

:Win2k
copy \\fileserver\share\chgprint\Win2k\*.* %temp%\chgprint
goto Logfile

:WinXP
copy \\fileserver\share\chgprint\Win2k\*.* %temp%\chgprint
goto Logfile

:Logfile
set chgprintlog=%temp%\chgprint\chgprint.log
goto Execute

:Execute
%temp%\chgprint\chgprint.exe /nodialogs
if errorlevel == 3 if not errorlevel == 4 echo
%COMPUTERNAME%\%USERNAME% nothing to do, no printer connections
installed >> %CHGPRINTLOG%
if errorlevel == 2 if not errorlevel == 3 echo ChgPrint executed from
desktop not running Windows NT >> %CHGPRINTLOG%
if errorlevel == 1 if not errorlevel == 2 echo
%COMPUTERNAME%\%USERNAME% could not locate TranslatePrinter.Txt file >>
%CHGPRINTLOG%
if errorlevel == 0 if not errorlevel == 1 echo
%COMPUTERNAME%\%USERNAME% executed ChgPrint without error. >>
%CHGPRINTLOG%
goto Followup

:Followup
%temp%\chgprint\defptr.exe -i
-----------------------------------
start of script
-----------------------------------

That last line there runs defptr.exe, a little program that prompts the
user through a simple interface to select the printer from a drop down
list, that should be the default pritner. I implemented this because I
noticed that CHGPRINT tends to not preserve the default printer.

Hope that helps.

:Bazooka-Joe
 
Woops, I was typing to fast. That last bit there should say "end of
script" not "start of script" again. Sorry. Also, obviously, the
Echo'd lines should not carriage return like it did if you're viewing
it through Google groups. I know it's a little confusing. Reply here
if I can help further or answer any questions. Also, I forgot to
specify, but of course it's the workstations that launch the script.

Keep in mind printer connections are profile specific. If users jump
around from workstation to workstation, they'll have to run it after
they log in to each system they use.

:Bazooka-Joe
 
Nice script! I tried it here and it works for all printernames less than 20
chars or so. (We have names like:
xxx.state.de.us\Dept_Number_PS_very_long_printername)
Is this a limitation of chgprint.exe? I'm looking for a newer version of
this since mine has date of Feb 99. Nice script anyway. Thanks...
 
Back
Top