How do you do....it? Thread, Installing printers by location in Technical; Currently we use a vbscript to set the printers on a workstations when the user logs in. This may be ...
24th February 2008, 06:40 PM #1
Installing printers by location
Currently we use a vbscript to set the printers on a workstations when the user logs in. This may be run either from All users\startup or from a loginscript in a GPO.
What I would really like to have is one script that runs on all computers at startup or login which looks at the attribute of the computer class in Active Directory to see what it's location is, look up the correct printers for that location in a text file, and then install them.
I have a script that will return the location from AD for a particular PC but I can't find out how to look up the printers from a text file.
Has anyone else tried this sort of script?
I have come across some software that does this. It is part of the Jigsaw suite that Akhtar install, it is based on Con2prt but it is copyrighted!
24th February 2008, 06:52 PM #2
- Rep Power
We're using the 2003 Server R2 Print Management Console to do this and deploy the printer on a per-machine basis, works really well.
The other alternative is to turn on Loopback, and apply a user GPO to a computer OU for a similar effect.
I had thought about doing the way you had mentioned too...
The way I planned was to grab just the computer name though and run it through a
Of course, you could probably do exactly the same with the OU name that the computer is a part of.
SELECT CASE strComputerName
I'm sure there's something for this in the wiki too...
24th February 2008, 07:29 PM #3
The new bit on the forum which shows similar threads is very useful. I had tried searching and not found much but the similar threads produced some interesting links. The most promising is has a script called printers_195.vbs on page http://edugeek.net/forums/showthread.php?t=394 but unfortunately there are no page breaks in the script and it is difficult to read.
Anyone have a copy of that thread with appropriate page breaks?
Like some other users, I can't use the computer name as this is a unique name that can't be changed and computers are moved from one room to another.
24th February 2008, 08:04 PM #4
That doesn't sound like a particularly hard problem to solve - a quick look up on Google for "vbscript read file" or similar should give you an answer. Make sure your script can find the text file in question - I should have thought the easiest thing to do would be to put your list of printers in a read-only hidden share somewhere on your network and have your script read that ("\\server\$hiddenShare\printers.txt" or whatever).
Originally Posted by Osprey
24th February 2008, 08:37 PM #5
We have a script that looks at the OU the PC is in from AD then assigns printers accordingly. You're welcome to that if you want.
Originally Posted by Osprey
25th February 2008, 12:37 PM #6
Here's our script that identifies the PC location from the it's OU and sets appropriate printers (with most of the printers removed for ease of reading!)
25th February 2008, 02:47 PM #7
By dezt in forum Web Development
Last Post: 13th October 2007, 11:10 PM
By witch in forum Comments and Suggestions
Last Post: 7th September 2007, 07:20 PM
By NeoNemesis in forum Windows
Last Post: 6th August 2007, 09:03 AM
Last Post: 19th April 2007, 10:22 AM
By ICTNUT in forum Scripts
Last Post: 13th May 2006, 09:19 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)