Go Back   Computer Forums > General Computing > Server Administration
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 10-04-2012, 01:19 PM   #1
Beta Member
Join Date: Oct 2012
Location: USA
Posts: 1
Default Scripting to add printers to a computer group

Hey guys.
At my school we have 2 printers in our media center than the media center teacher is very picky that the B&W printer be the default printer. Because I cant find a way to (by computer group not user) add both printers and make the B&W a default printer in GPO I have found the need/workaround to script both printers to be added and have the scripts run form the reg. when the student logs in.

The following 2 scripts are running from the C:\windows folder

For the b&w printer

Set WshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\gcprint01\MediaCenterB&W"
PrinterDriver = "Lanier LP37N PCL 6"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
WshNetwork.SetDefaultPrinter \\gcprint01\MediaCenterB&W

For the color printer

Set WshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\gcprint01\MediaCenterColor"
PrinterDriver = "HP Color LaserJet 3500"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
WshNetwork.SetDefaultPrinter \\gcprint01\MediaCenterB&W

Here is my reg file I added

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Run]
"BW Printer Script"="C:\\windows\\Printer Scripts\\BWPrinter.vbs"
"Color Printer Script"="C:\\windows\\Printer Scripts\\Colorprinter.vbs"

My problem is that Some of the computers randomly dont connect to the color printer and are duplicating the b&w Printer. Can anyone find any fault here or something im missing. I am fairly new to scripting so please forgive me if its a stupid mistake.


fahmi1 is offline   Reply With Quote
Old 12-09-2012, 07:38 AM   #2
Baseband Member
Join Date: Nov 2012
Location: australia
Posts: 27

Run a logon script from group policy. I'd honestly install the printers through group policy
computerMAnn101 is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 07:06 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0