Windows Thread, need advice on assigning printers based on classroom in Technical; i would be greatful if you could help me out here.
I have created a few vb scripts that map ...
-
18th October 2006, 01:58 PM #1 need advice on assigning printers based on classroom
i would be greatful if you could help me out here.
I have created a few vb scripts that map networked printers.
I have 12 of these scripts for the different classrooms. How would i assign these so that if a pupil logs on in a particular room they get the networked printers installed in that room.
Would i have to create gpos and assign them to the various classroom ou's ( i have all over pc's organised in seperate ou's based on the room they are in)
many thanks
-
-
IDG Tech News
-
18th October 2006, 02:05 PM #2 Re: need advice on assigning printers based on classroom
We use a logon script that checks the name of the PC in the room (say for example 101A), and then it installs the printers allocated to that room number. This way wherever a pupil logs in they get the relevant printers for that room.
There have been a few threads similar to this on the forums, a few of the threads have example scripts, best to do a forum search and root them out
-
-
18th October 2006, 02:05 PM #3 Re: need advice on assigning printers based on classroom
It depends on how you have your PC's named.
For example our PCs are named as <school number>-<room number>-<PC number>
So the simplest thing would be to create a single VB script the gets the PC name and then by looping through a select statement match the PC namr to the printer specified for that PC/Room.
I have then added this script to our Student GPO so at logon the script runs and the printers are added on a room by room basis.
-
-
18th October 2006, 02:15 PM #4 Re: need advice on assigning printers based on classroom
Yes, there's a script posted by Ric in the scripts forum that does room based printer assignment based on PC hostnames.
http://www.edugeek.net/index.php?nam...iewtopic&t=404
-
-
18th October 2006, 02:25 PM #5
- Rep Power
- 12
Re: need advice on assigning printers based on classroom
At my place we place an Environmental Variable called location on the pcs and as the value we put the room name/number. During login the logon batch file calls a seperate printers one, checks the variable and installs the correct printer or printers and sets the default one for us.
Robert
-
-
18th October 2006, 02:52 PM #6 Re: need advice on assigning printers based on classroom
Get yerself a CC3 network does all this with just a few clicks of the mouse.
-
-
18th October 2006, 03:01 PM #7 Re: need advice on assigning printers based on classroom
I haven't tried this, but if you have W2k3 R2 you can push printers either to Computers or Users...
we use a VB scripts that look at the computer name if its room43Somthing they get the 43 printers etc... one on login and one on logout.. and they work well so I haven't bothered exploring using R2s Printer push option.. I believe you need to deploy and have running an EXE on the PCs from the brief gander I had at it…
-
-
18th October 2006, 03:03 PM #8 Re: need advice on assigning printers based on classroom
As bossman says, it's this easy.
-
-
18th October 2006, 03:16 PM #9 Re: need advice on assigning printers based on classroom
This script maps printers based on group membership.
' printermap.vbs
' VBScript to map different groups to different printer shares.
' Author Darren Mussenden
' Version 1.2.0 - September 27 2006
' -----------------------------------------------------------------'
Option Explicit
Dim objNetwork, objUser, CurrentUser
Dim strGroup
Const hu5_Group = "cn=hu5"
Const enwr_Group = "cn=enwr"
Const scgf_group = "cn=scgf"
Const ss_group = "cn=ss"
Const maof_group = "cn=maof"
Set objNetwork = CreateObject("WScript.Network")
Set objUser = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & objUser.UserName)
strGroup = LCase(Join(CurrentUser.MemberOf))
If InStr(strGroup, hu5_Group) Then
objNetwork.AddWindowsPrinterConnection("\\NAS01\HU 5 Black Laser")
objNetwork.AddWindowsPrinterConnection("\\NAS01\HU 5 Colour Laser")
objNetwork.SetDefaultPrinter "\\NAS01\HU5 Black Laser"
ElseIf InStr(strGroup, enwr_Group) Then
objNetwork.AddWindowsPrinterConnection("\\NAS01\EN WR Black Laser")
objNetwork.AddWindowsPrinterConnection("\\NAS01\EN WR Colour Laser")
objNetwork.SetDefaultPrinter "\\NAS01\ENWR Black Laser"
ElseIf InStr(strGroup, scgf_Group) Then
objNetwork.AddWindowsPrinterConnection("\\NAS01\SC GF Black Laser")
objNetwork.AddWindowsPrinterConnection("\\NAS01\SC GF Colour Laser")
objNetwork.SetDefaultPrinter "\\NAS01\SCGF Black Laser"
ElseIf InStr(strGroup, ss_Group) Then
objNetwork.AddWindowsPrinterConnection("\\NAS01\SS Black Laser")
objNetwork.AddWindowsPrinterConnection("\\NAS01\SS Colour Laser")
objNetwork.SetDefaultPrinter "\\NAS01\SS Black Laser"
ElseIf InStr(strGroup, maof_Group) Then
objNetwork.AddWindowsPrinterConnection("\\NAS01\MA OF Black Laser")
objNetwork.AddWindowsPrinterConnection("\\NAS01\MA OF Colour Laser")
objNetwork.SetDefaultPrinter "\\NAS01\MAOF Black Laser"
End If
WScript.Quit
-
-
18th October 2006, 03:21 PM #10 Re: need advice on assigning printers based on classroom

Originally Posted by
bossman Get yerself a CC3 network does all this with just a few clicks of the mouse.
I would rather hit my left te$%&cle with a large blunt object but each to their own.
How many new PC's would the cost of your RM support bought last year?
-
-
18th October 2006, 03:22 PM #11 Re: need advice on assigning printers based on classroom
We don't pay RM for support. Let me turn that round ... how many computers can you buy for the time spent hacking batch files together and paying through the nose for 3rd party software to do what RM CC3 does?
-
-
18th October 2006, 03:30 PM #12 Re: need advice on assigning printers based on classroom
“hacking batch files" is an occupational hazard of a "real" network manager.
I am all for making your life as easy as possible but scripting is an valuable skill to learn, especially if your career path takes you into the “real world” where there is no RM to hold your hand.
-
-
18th October 2006, 03:36 PM #13 Re: need advice on assigning printers based on classroom

Originally Posted by
djm968 “hacking batch files" is an occupational hazard of a "real" network manager.
Sorry? You're saying all Network Managers who run CC3 networks aren't "real"? (Whatever your definition of that is). I find that remark quite insulting (even though I am not a Network Manager), as would a few others on here I imagine.

Originally Posted by
djm968 I am all for making your life as easy as possible but scripting is an valuable skill to learn, especially if your career path takes you into the “real world” where there is no RM to hold your hand.
I quite agree. Personally speaking I'm perfectly capable of scripting (in several languages), and have been doing so for 7 years. That doesn't mean we shouldn't run a CC3 network; why re-invent the wheel?
-
-
18th October 2006, 03:39 PM #14
- Rep Power
- 0
Re: need advice on assigning printers based on classroom
Yeah careful djm968 or RussDev might just zap you. He runs RM CCx, I think.
-
-
18th October 2006, 03:39 PM #15 Re: need advice on assigning printers based on classroom
We'd used to do it with environment variables and batch files at logons. But everytime we re-imaged a machine we'd get called away to go and do another job and forget to set an environment variable and then a week later we'd get complaints about printers not working, so it got moved over to VB script.
-
SHARE:
Similar Threads
-
By NeoNemesis in forum Windows
Replies: 11
Last Post: 6th August 2007, 08:03 AM
-
By originofsymmetry in forum Network and Classroom Management
Replies: 3
Last Post: 11th July 2007, 06:02 AM
-
By richard in forum Networks
Replies: 12
Last Post: 4th January 2007, 10:14 AM
-
By ICTNUT in forum Scripts
Replies: 34
Last Post: 13th May 2006, 08:19 PM
-
By broc in forum Hardware
Replies: 10
Last Post: 7th February 2006, 01:19 AM
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
-
Forum Rules