Logon script to map printers to people in specified OU's

Any help or suggestions will be much appriciated because i am new to scripting.  Here is my problem.  I have 25 XP machines in an OU called StandaloneXP.  I have a group policy applied to the computers in this OU so that all users who log on to these machines will have the policy applied to them.  Users who log into these machines belong to different departments - I have all my users in seperate OU's by department.  I want to create a VBScript so that when a user logs onto one of the XPMachines it will map certain printers by which department OU the user is in.  

For instance:

When user in finance department(finance OU) logs on to XPMAchine they need to have 8 finance printers mapped when they logon.

When user in hr department (HumanResources OU) logs on they need to have 4 HR printers mapped etc etc etc....

****Now i know i can add the script to each Department OU and script the printers like that.  But i run a mixed envirnoment where some users have 2000/xp client machines and others run thin client  - citrix.  Some users use both so i want to keep the script contained to the StandAloneXP OU where all the Xp computers are.  

I am new to scripting so I am pasting a copy of the script i wrote to map drives and printers.  I would like to add or change this around so i can do what i have explained above.  This script basically only maps the finance printers for everyone that logs into the XPMachines.  

Dim objNet
Set objNet = CreateObject("Wscript.Network")
' Forces script to skip errors (rem below line to see errors)
on error resume next

Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScript.Network")
' all drives to be removed here are set here.
WshNetwork.RemoveNetworkDrive "H:"
WshNetwork.RemoveNetworkDrive "Q:"
WshNetwork.RemoveNetworkDrive "F:"
'all drives to be mapped are set here.
objNet.MapNetworkDrive "H:", "\\FS01\MIS111"
objNet.MapNetworkDrive "Q:", "\\FC01\ETIME"
objNet.MapNetworkDrive "F:", "\\SOH\SYS"

Dim net
Set net = CreateObject("WScript.Network")
net.AddWindowsPrinterConnection "\\LIHFS01\FINANCE_4", "FINANCE_4"
net.AddWindowsPrinterConnection "\\LIHFS01\FINANCE_9", "FINANCE_9"
net.AddWindowsPrinterConnection "\\LIHFS01\FINANCE-2", "FINANCE_2"
net.AddWindowsPrinterConnection "\\LIHFS01\FINANCE--2", "FINANCE_22"
net.AddWindowsPrinterConnection "\\LIHFS01\FINANCE-3", "FINANCE_3"
net.AddWindowsPrinterConnection "\\LIHFS01\FINANCE-6", "FINANCE_6"
net.AddWindowsPrinterConnection "\\LIHFS01\FINANCE-8", "FINANCE_8"
 

GPEARL383Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David LeeCommented:
Take a look at this previous EE question that addresses the same issue.
http://www.experts-exchange.com/Networking/WinNT_Networking/Q_20868659.html

Pay attention to the post from stablerm Date: 02/02/2004 11:49AM EST
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.