Discussion Locked

How to Migrate Shared Printers

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
We need to decommission an NT 4 Print Server. We plan to create the same configurations on an existing NT Server. I am looking for a way to migrate the Win98 and NT4 Workstations clients to the new server. We have SMS, so we can run a script on eachPC under the current users account. Have you seen a script or commandline utility which can do this. I tried the Win2K RK PRNMGR.VBS process and that did not work.

2 replies

by arne.tredal

We have used the following kixtart script to do a similar function;

$Mark = READVALUE("HKEY_CURRENT_USER\Printers","completed")
if $Mark = "completed"
QUIT
endif

;;SYSTEM DEFINED VALUES
$DEBUG = "NO"
$INIStore = "@LDRIVE\ReMapPRT.INI"
$PRINT = "HKEY_CURRENT_USER\Printers\Connections\"
$DEFPRT = "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows"
$PRIMARYINDEX = 0

;; Get the users default printer
IF (existkey($DEFPRT) = 0)
$default_printer=ReadValue($DEFPRT, "device")
ELSE
$default_printer=""
ENDIF

;;To find all installed printers, we need to enumerate through the registry
;;to see what's installed
DO
$PORT = ""
$NEWPORT = ""
$KEY = ENUMKEY($PRINT,$PRIMARYINDEX)
If $KEY <> ""
$PORT = READPROFILESTRING("$INIStore","$KEY","OldPort")
If $PORT <> ""
$NEWPORT = ReadProfileString("$INIStore","$KEY","NewPort")
If $NEWPORT <> ""
If DelPrinterConnection ($PORT) = 0
? "Deleted printer connection....$PORT"
If AddPrinterConnection ($NEWPORT) = 0
? "Added printer connection....$NEWPORT"
If (InStr(UCase($default_printer), $PORT) <> 0)
If SetDefaultPrinter ($NEWPORT) = 0
? "Changed default printer to....$NEWPORT"
EndIf
EndIf
$PRIMARYINDEX = -1
EndIf
EndIf
EndIf
EndIf
EndIf
IF $DEBUG = "YES"
? "Next primary index: $PRIMARYINDEX"
? "Print key found: $KEY"
? "PORT value found: $PORT"
? "NewPORT value found: $NewPORT"
EndIf
$PRIMARYINDEX= $PRIMARYINDEX + 1
UNTIL $KEY= ""
$null = WRITEVALUE("HKEY_CURRENT_USER\Printers","Remap","completed",REG_SZ)

Example "ReMapPrint.ini":
[,,OldServer,OLdQueue]
OldPort=\\OLDSERVER\oldqueue
NewPort=\\NEWSERVER\newqueue

by lundb

The Win2K RK was updated and there is a new version of PRNMGR which seems to work.
There is an NT4 RK tool CHHPRINT.EXE when used within a login script or an SMS Advertisement also works.

This discussion is closed to new replies.