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 ...
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!
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.
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.
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).
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!
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.
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!)