Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Rename a networked printer...

Posted on 2010-08-26
5
Medium Priority
?
900 Views
Last Modified: 2012-05-10
Hi,

We have recently joined our parent companies 2008 Active Directory.
We currently have a Windows Server 2000 print server sharing printers to about 50 PC users running XP.

We would like to change the naming convension of our printers i.e. from IT HP LaserJet 2430 > DC1 IT HP LaserJet 2430.
I can do this fine and it lists in Active Directory with the new name. However it breaks the current printer that is setup on a machine already.

Is there a way to rename the printer without the need to visit each machine to set the printer up again?

Thanks!
0
Comment
Question by:Vai777
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 

Expert Comment

by:rlaning
ID: 33532141
This is a nasty problem. All user profiles on all pc's have printer connections to \\server\oldname and these need to be changed into \\server\newname.  As far as I know of, there is no other way to do this (apart from manually) than to run a loginscript that looks at the current printerconnections for this user and replaces them if they do not conform to the new naming pattern.

A similar problem is when all printqueues are moved to another server (with unchanged names).  I used to following script to tackle this :

' ##########################################################################
' #
' # Remap printers : move attached printers from server to be demoted to
' #                  new server
' #
' ##########################################################################

On error resume next

Const OldServer = "oldserver"
Const NewServer = "newserver"

Dim OldPrQ
Dim NewPrQ
Dim CurDefaultPrinter

Set WshNetwork = WScript.CreateObject("WScript.Network")
Set WshShell = WScript.CreateObject("Wscript.Shell")

CurDefaultPrinter = "*** NO DEFAULT PRINTER ***"
CurDefaultPrinter = WshShell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device")
If Instr(CurDefaultPrinter, ",") > 0 Then
  CurDefaultPrinter = Left(CurDefaultPrinter, Instr(CurDefaultPrinter, ",")-1)
End If

Set oPrinters = WshNetwork.EnumPrinterConnections
For i = 0 to oPrinters.Count - 1 Step 2
    OldPrQ = oPrinters.Item(i+1)
    If Instr(Lcase(OldPrQ), LCase("\" & OldServer & "\")) > 0 Or _
     Instr(Lcase(OldPrQ), LCase("\" & OldServer & ".")) > 0 Then
      WScript.Echo "Remapping printer connection : " & OldPrQ & " (" & oPrinters.Item(i) & ")"
         ' Remove old printer
         WshNetwork.RemovePrinterConnection OldPrQ, True, True
         If Err.Number = 0 Then
           Wscript.Echo "Removed printer connection " & OldPrQ
           NewPrQ =  Replace( LCase(OldPrQ), LCase("\" & OldServer), LCase("\" & NewServer))
           Wscript.Echo "New printer connection will be : " & NewPrQ
           WshNetwork.AddWindowsPrinterConnection NewPrQ
           If Err.Number = 0 Then              
                 Wscript.Echo "Created printer connection " & NewPrQ
                 If LCase(CurDefaultPrinter) = LCase(OldPrQ) Then
                   WScript.Echo "Setting this printer as default"
                   WshNetwork.SetDefaultPrinter NewPrQ
                 End If
           Else
                 WScript.Echo "ERROR creating printer connection " & NewPrQ
          End If
         Else
         WScript.Echo "ERROR deleting printer connection " & oPrinters.Item(i+1)
        End If
    End If  
                  
Next


I guess you can tweak this to solve your version of this problem....
0
 
LVL 38

Expert Comment

by:Hypercat (Deb)
ID: 33532467
If your users are using Vista or Windows 7 OS on the workstations, you could use the Print Management Console on one of your Windows 2008 servers to deploy the printers through group policy. It's pretty simple and works very smoothly with Win7/Vista - not so smoothly with Windows XP although it is possible with some tweaking. Take a look at this article with links to info on how to do this:
http://technet.microsoft.com/en-us/library/cc754699.aspx 
0
 

Author Comment

by:Vai777
ID: 33532675
The users computers are all running XP. The print server itself is running Windows Server 2000.

It might just be easier to do it by department and visit each machine. Its not that many tbh.
0
 
LVL 38

Accepted Solution

by:
Hypercat (Deb) earned 750 total points
ID: 33532823
Yeah - with XP and Windows 2000, you don't have a lot of choices - two in fact: scripting as described by rlaning, or visiting each machine. IME, creating and troubleshooting a script for a relatively small number of machines is usually more trouble than it's worth. One thing you could do to make your like a bit easier would be to do the change manually on one machine, then export the applicable registry entries and use that .reg file to import on all the other machines. That way you don't have to do the whole process manually on each machine.
0
 

Author Closing Comment

by:Vai777
ID: 33586442
Decided that it would be easier to rename the printers and set them up manually again.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
This process allows computer passwords to be managed and secured without using LAPS. This is an improvement on an existing process, enhanced to store password encrypted, instead of clear-text files within SQL
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question