Book now with code EOY2025
Claymoore wrote: » Is this on a Novell network? If not, have you considered using Group Policy rather than VBScript?
johnnyg5646 wrote: » I'm trying to write a vbscript that looks at user's OU and maps a specific printer based on that OU membership. I've done this in the past with a computer's OU and it has worked great. But now I have a need to do it based on a user. This is what I had for a computer's OU Set objSysInfo = CreateObject("ADSystemInfo") strName = objSysInfo.ComputerName arrComputerName = Split(strName, ",") arrOU = Split(arrComputerName(1), "=") strComputerOU = arrOU(1) Set objNetwork = CreateObject("WScript.Network") 'ALL OU'S ARE CASE SENATIVE!!! Select Case strComputerOU Case "P208" objNetwork.AddWindowsPrinterConnection "\\nwprint\nw-0026" objNetwork.SetDefaultPrinter "\\nwprint\nw-0026" MsgBox "Printer NW-0026 has been mapped to your computer!" Not sure what I would need to chage to make it apply to a user's OU rather than a computers. Any help will be appreciated. Thanks everyone!!
Use code EOY2025 to receive $250 off your 2025 certification boot camp!