General discussion

Locked

Logon VBScript - If OU = ? then .....

By Martin Powell ·
Hi, I'm trying to write a script file that installs a printer. I've no problem with the printer install, but I want to connect the user to a printer dependant on their location\group. The OU's are structured by site, so e.g. If OU = Site1 then connect to Site1 printer, or if OU = Site2 then connect to Site2 printer. etc. etc.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Logon VBScript - If OU = ? then .....

by Krompton In reply to Logon VBScript - If OU = ...

The following link may answer your question or at least start you in the right direction.

Krompton(AKA Steve)
http://www.jsiinc.com/subb/tip0600/rh0672.htm

Collapse -

Logon VBScript - If OU = ? then .....

by Martin Powell In reply to Logon VBScript - If OU = ...

Thanks Steve,

I'm not too sure when it come to programming but I think I have the information on Windows Scripting that should do the job. I just need to incorperate, my existing print map script into the script I found... See below...

Set oADsSysInfo = CreateObject("ADSystemInfo")

' Get distinguished name of the current user
sADsUser = oADsSysInfo.UserName

If InStr(1, sADsUser, "OU=marketing,", vbTextCompare) > 0 then
'map J: to \\server\shares_marketing
Elseif InStr(1, sADsUser, "OU=sales,", vbTextCompare) > 0 then
'map K: to \\server\shares_sales
end if

Collapse -

by Martin Powell In reply to Logon VBScript - If OU = ...

This question was closed by the author

Back to Windows Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums