change printer from one server to new server

R

Ron C

Looking for a script that will change printer mappings
from \\servera\share \\serverb\share

I am phasing out an old server which is controlling all
printers. I have created all the printers on the new
server and made sure the share names are the same. Now,
all I need is something to run on all the desktops that
will change the printers from \\servera to \\serverb

However, it's not as simple as I thought it was going to
be. I can't get nothing to work!!
 
T

Troy

Ron, I accomplished this with a KIX login script. In
Windows 9x I had to use a utilite called SPS.EXE. In
Windows NT,2K, and XP just edit the registry. HOFSERV2
and HOFSERV4 are the print server names in this example.
HOFSER4 is the server being replaced. Sorry, this does
not view very well on this page.

; Note this causes a login script error if
no printers are defined
; IF @INWIN = "2"
; SHELL "$NETLOGON\SPS \\HOFSERV4
\\HOFSERV2"
; ENDIF
; IF @INWIN = "1"
; $index = 0
; :Loop1
; $KeyName = ENUMKEY
("HKEY_CURRENT_USER\Printers\Connections\", $Index)
; If @ERROR = 0
; $ServerName = UCASE(SUBSTR
($KeyName,3,8))
; If $ServerName = "HOFSERV4"
; $PrinterName = SUBSTR
($KeyName,12,LEN($KeyName))
; If DelPrinterConnection
("\\$ServerName\$PrinterName") = 0
; If
AddPrinterConnection ("\\HOFSERV2\$PrinterName") = 0
; ? "Printer
$PrinterName remapped..."
; Endif
; Endif
; Endif
; $Index = $Index + 1
; goto Loop1
; Endif
; ENDIF
 
R

Ron C.

Great. Thanks
-----Original Message-----
Ron, I accomplished this with a KIX login script. In
Windows 9x I had to use a utilite called SPS.EXE. In
Windows NT,2K, and XP just edit the registry. HOFSERV2
and HOFSERV4 are the print server names in this example.
HOFSER4 is the server being replaced. Sorry, this does
not view very well on this page.

; Note this causes a login script error if
no printers are defined
; IF @INWIN = "2"
; SHELL "$NETLOGON\SPS \\HOFSERV4
\\HOFSERV2"
; ENDIF
; IF @INWIN = "1"
; $index = 0
; :Loop1
; $KeyName = ENUMKEY
("HKEY_CURRENT_USER\Printers\Connections\", $Index)
; If @ERROR = 0
; $ServerName = UCASE(SUBSTR
($KeyName,3,8))
; If $ServerName = "HOFSERV4"
; $PrinterName = SUBSTR
($KeyName,12,LEN($KeyName))
; If DelPrinterConnection
("\\$ServerName\$PrinterName") = 0
; If
AddPrinterConnection ("\\HOFSERV2\$PrinterName") = 0
; ? "Printer
$PrinterName remapped..."
; Endif
; Endif
; Endif
; $Index = $Index + 1
; goto Loop1
; Endif
; ENDIF





.
 

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