Announcement

Collapse
No announcement yet.

Change Printer Names

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Change Printer Names

    Morning everyone,
    My predecessor decided to have fun with the printer names (each one is named for a country, with no rhyme or reason). After my CEO accidentally printed some 20 page document to the color printer, which he meant to send to one of the standard printers, he has tasked me with changing the printer names to something more intelligent (The printers i have installed since i got here, all have names that make sense!!) They printers are staying on the same print server, it is just that the share names will change.

    I have migrated printers before, but it always entailed leaving the same printer name, just changing the print server. I have tried searching through the forums for an answer to the best way of doing this, but I cannot find a script or procedure that will look at the computer, see what printers it has installed, delete the existing printer connections, and re-add them with the new names.

    In the short term, I will probably create new DNS entries for the new names, and leave the existing ones there, so people will still be able to print (that should work, shouldn't it?) but i would like a more permanant solution.

    Does anyone have any thoughts?

    app

  • #2
    Re: Change Printer Names

    Why not just change the share name and delete the old printers and add the renamed ones.

    There will be scripts on here that do this.

    Comment


    • #3
      Re: Change Printer Names

      That is what i want to do. Unfortunately, i need make this as seamless as possible for my end users. So, I need to find a script, that i can put in the login script that will loop through the users installed printers, compare the existing installed ones, change the name, and delete the old ones. Otherwise, my Desktop Support team will have to visit each person's workstation to make the necessary changes.

      And just thinking about my thought to use DNS trickery to spoof the printer names, i do not think that will work, since the printers are shares, not DNS paths.

      I cannot find such a script to do what i need.

      Any assistance would be greatly apprecaited.

      app

      Comment


      • #4
        Re: Change Printer Names

        Just curious, but how many printers are we talking about here?
        1 1 was a racehorse.
        2 2 was 1 2.
        1 1 1 1 race 1 day,
        2 2 1 1 2

        Comment


        • #5
          Re: Change Printer Names

          OK, i have done some research on this on a couple other scripting boards, and i found something that should work, but i think i am missing something. I am getting the complete message at the end of the script, but it is not making any changes to my system. Can someone help with this?

          Code:
          Dim Printer1, Printer2, Printer3, Printer4, Printer5, Printer6, Printer7
          Printer1 = "Tokyo"
          Printer2 = "Geneva"
          Printer3 = "Accounting"
          Printer4 = "Rio"
          Printer5 = "Moscow"
          Printer6 = "Venice"
          Printer7 = "Canon_3570_CopyRoom"
          
          Dim NewPrint1, NewPrint2, NewPrint3, NewPrint4, NewPrint5, NewPrint6, NewPrint7
          NewPrint1 = "Marketing_BW"
          NewPrint2 = "Accounting_1"
          NewPrint3 = "Accounting_2"
          NewPrint4 = "Sales"
          NewPrint5 = "Accounting_Checks"
          NewPrint6 = "Marketing_Color"
          NewPrint7 = "Canon_3570_Annex"
          
          Set oNet=CreateObject("Wscript.Network")
             Set colPrint = ONet.EnumPrinterConnections
              'If no network printers enumerated, then inform user, else display
               'enumerated printers
              If colPrint.Count = 0 Then
                  WScript.Echo = "There are no printers to enumerate."
              Else
                  For i = 1 To colPrint.Count - 1 Step 2
                      If UCASE(colPrint(i))="\\Dale\" & Printer3 Then
                          WScript.Echo "removing " & colPrint(i)
                          oNet.RemovePrinterConnection "\\Dale\" & Printer3,True,True
                          strNew="\\Dale\" & NewPrint3
            WScript.echo "adding " & strNew
                          oNet.AddWindowsPrinterConnection strNew
                      End If
                      'repeat for next printer to be replaced
                  Next
              End If
          wscript.echo "Complete"
          Thanks for the help everyone.

          app

          Comment


          • #6
            Re: Change Printer Names

            Maybe you need to remove the existing printers first.
            1 1 was a racehorse.
            2 2 was 1 2.
            1 1 1 1 race 1 day,
            2 2 1 1 2

            Comment


            • #7
              Re: Change Printer Names

              I thought that is what
              Code:
               Else
                      For i = 1 To colPrint.Count - 1 Step 2
                          If UCASE(colPrint(i))="\\Dale\" & Printer3 Then
                              WScript.Echo "removing " & colPrint(i)
                              oNet.RemovePrinterConnection "\\Dale\" & Printer3,True,True
              was doing. It looks like it runs through, and if it finds the printer, it deletes it, and then adds a new one.

              Maybe i am wrong, but that it what i thought it was doing.

              thanks

              app

              Comment


              • #8
                Re: Change Printer Names

                Instead of using the RemovePrinterConnection Method you can also use WMI to delete printers.
                http://forums.petri.com/showthread.p...9218#post79218


                Originally posted by biggles77
                Maybe you need to remove the existing printers first.
                Yes,
                Remove the printers from every profile before renaming the shared printers on the server! (http://www.microsoft.com/communities...5-d1124b0bee56).
                Instead of renaming shared printers on the server I think it is better to create new printers.

                \Rems

                This posting is provided "AS IS" with no warranties, and confers no rights.

                __________________

                ** Remember to give credit where credit's due **
                and leave Reputation Points for meaningful posts

                Comment

                Working...
                X