Osprey Posted February 24, 2008 Posted February 24, 2008 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!
Lithium Posted February 24, 2008 Posted February 24, 2008 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 SELECT CASE strComputerName case 1 add printer1 case 2 add printer2 end select Of course, you could probably do exactly the same with the OU name that the computer is a part of. I'm sure there's something for this in the wiki too...
Osprey Posted February 24, 2008 Author Posted February 24, 2008 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.
dhicks Posted February 24, 2008 Posted February 24, 2008 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). -- David Hicks
jcollings Posted February 24, 2008 Posted February 24, 2008 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.
SpuffMonkey Posted February 25, 2008 Posted February 25, 2008 Hi 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!)logon_student_061026.vbs.txt
Geoff Posted February 25, 2008 Posted February 25, 2008 I use Rics script. http://www.edugeek.net/forums/showthread.php?t=394
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now