+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
Windows 7 Thread, Fed up of 'Deploying printer settings' in Technical; after fighting these thoughts I have come to the conclusion I am just making my day harder than it should ...
  1. #16
    robjduk's Avatar
    Join Date
    Jun 2011
    Posts
    480
    Thank Post
    17
    Thanked 69 Times in 54 Posts
    Rep Power
    23
    after fighting these thoughts I have come to the conclusion I am just making my day harder than it should be by insisting on group policy. Could anyone direct me to a good resource for scripting printers please?

    Ta

  2. #17

    Join Date
    Mar 2008
    Location
    Medway, Kent
    Posts
    137
    Thank Post
    23
    Thanked 30 Times in 27 Posts
    Rep Power
    19
    this is a vb script to add printers just copy to notepad and save as .vbs you'll need to edit the printserver\printer lines


    Dim objNetwork
    on error resume next

    Dim PrinterDriver, PrinterPath,PrinterDriver1, PrinterPath1,PrinterDriver2, PrinterPath2

    Set objNetwork = CreateObject("WScript.Network")

    PrinterPath = "\\PRINT SERVER NAME\PRINTER"
    PrinterDriver = "PRINTER MAKE AND MODEL"
    PrinterPath1 = "\\PRINT SERVER NAME\PRINTER"
    PrinterDriver1 = "PRINTER MAKE AND MODEL"
    PrinterPath2 = "\\PRINT SERVER NAME\PRINTER"
    PrinterDriver2 = "PRINTER MAKE AND MODEL"

    objNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
    objNetwork.AddWindowsPrinterConnection PrinterPath1, PrinterDriver1
    objNetwork.AddWindowsPrinterConnection PrinterPath2, PrinterDriver2
    objNetwork.SetDefaultPrinter PrinterPath

  3. Thanks to glen_j from:

    robjduk (14th May 2014)

  4. #18
    Duke5A's Avatar
    Join Date
    Jul 2010
    Posts
    818
    Thank Post
    84
    Thanked 136 Times in 116 Posts
    Blog Entries
    8
    Rep Power
    32
    If you're looking for a bit more logic in the script: VB Script for network printer deployment - Blogs - EduGeek.net

  5. #19
    kcymer's Avatar
    Join Date
    Nov 2007
    Posts
    149
    Thank Post
    4
    Thanked 9 Times in 8 Posts
    Rep Power
    16
    same here , after using GPP and failing, we switched to script and all the problems disappeared.

  6. #20
    AJWhite1970's Avatar
    Join Date
    Sep 2012
    Location
    Wiltshire
    Posts
    346
    Thank Post
    92
    Thanked 79 Times in 61 Posts
    Rep Power
    18
    This is my ugly but works printer distribution script

    _InstallPRNVBS.bat
    cscript \\quartz\profiles\printers\_delete_prn.vbs
    cscript \\quartz\profiles\printers\vbs\%computername%.vbs
    Rem Fix50676 creates LOW directory in Appdata\temp
    msiexec /i \\nebula\apps\nwapps\flash\Fixit50676.msi /q

    _delete_prn.vbs
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colInstalledPrinters = objWMIService.ExecQuery _
    ("Select * From Win32_Printer Where Network = True")
    For Each objPrinter in colInstalledPrinters
    objPrinter.Delete_
    Next

    PC1234.vbs
    On Error resume Next
    set objNetwork = WScript.CreateObject("WScript.Network")
    set objShell = WScript.CreateObject("WScript.Shell")
    'Add Network printers
    objNetwork.AddWindowsPrinterConnection "\\quartz\HP LaserJet P2055dn IT01 P1"
    objNetwork.AddWindowsPrinterConnection "\\quartz\HP Colour LaserJet CP2025 IT01"
    objNetwork.AddWindowsPrinterConnection "\\quartz\Konica Minolta 421 STAFFROOM"
    'Set Default Printer
    objNetwork.SetDefaultPrinter "\\quartz\HP LaserJet P2055dn IT01 P1"

    The link to the fixit file I use is as follows:
    Unable to print or view the print preview of a webpage in Internet Explorer

    Hope that helps someone
    Andrew

  7. #21
    IGB
    IGB is offline

    Join Date
    Apr 2009
    Location
    South Glos
    Posts
    20
    Thank Post
    1
    Thanked 1 Time in 1 Post
    Rep Power
    0
    We deploy our printers via AD Groups and a KIX script on every login.
    Computer needs a connection to another printer, just add it to the Printer Group and it's there for the next login.

    Also handy if you have a printer that is Out Of Order, to just add the computers that were normally connected to it to another group.
    Computer moves to another office, add it to another Printer group.

    The only time I need to look at the script is when we add more printers, but as it's ony 5 lines of code it only take a few seconds to update once the printer has been installed on the server.
    As you can see from the code, we also utilise a virtual print queue that can release the prints to any device on the network so if a computer hasn't yet been added to a printer group, the device can still print.

    IF computerINGROUP("Domain Computers")=1
    Addprinterconnection ("\\PrintServer\FollowMe")
    ? "Added printer connection to Followme virtual queue"
    SETDEFAULTPRINTER ("\\PrintServer\FollowMe")
    ENDIF

    IF computerINGROUP("Exams Printer Group")=1
    Addprinterconnection ("\\PrintServer\exams")
    ? "Added printer connection to Exams MFD"
    SETDEFAULTPRINTER ("\\PrintServer\exams")
    ENDIF

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 4
    Last Post: 21st March 2014, 06:11 PM
  2. Replies: 1
    Last Post: 4th May 2010, 02:46 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •