Re: I need help with a login script
- From: "Costas" <cpstechgroup@xxxxxxxxx>
- Date: Fri, 25 Jan 2008 14:57:00 -0500
The script looks ok as far as programming goes.
A couple of things to look at. First make sure that the user id you are using to connect on the client machine is a member of at least one of the groups you have the "IF" statements (e.g. Accounting, Sales... etc). Another thing is the "\\LSNSRV01" is that a member server in the domain? Do the printers map properly?
--
Costas
"John K" <John K@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:F47B4582-5B2D-4D6A-BD28-34ABFF48D58E@xxxxxxxxxxxxxxxx
I have a problem with my login script. It is only mapping the first drive
"H". Am i missing something . Any help willbe appreciated. I am running the
script on a sbs2003 sp2 server with vista and xp clients.
Option Explicit
On Error Resume Next
Const lsn_Accounting_group = "cn=Accounting"
Const lsn_Sales_group = "cn=Sales"
Const lsn_Excecutive_group = "cn=Excecutive"
Const lsn_Operations_group = "cn=Operations"
Const lsn_Programming_group = "cn=Programming"
Set wshNetwork = CreateObject("WScript.Network")
wshNetwork.MapNetworkDrive "h:","\\xxxsrv01\Users\" & wshNetwork.UserName
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))
If InStr(strGroups, lsn_Accounting_group) Then
wshNetwork.MapNetworkDrive "F:","\\lsnsrv01\Accounting\"
wshNetwork.AddWindowsPrinterConnection "\\lsnsrv01\LaserJet4000"
wshNetwork.AddWindowsPrinterConnection "\\lsnsrv01\3500Color"
wshNetWork.SetDefaultPrinter "\\lsnsrv01\2840Color"
ElseIf InStr(strGroups, Lsn_Sales_group) Then
wshNetwork.MapNetworkDrive "S:","\\lsnsrv01\Sales\"
wshNetwork.AddWindowsPrinterConnection "\\lsnsrv01\LaserJet4000"
wshNetwork.AddWindowsPrinterConnection "\\lsnsrv01\3500Color"
wshNetWork.SetDefaultPrinter "\\lsnsrv01\2840Color"
ElseIf InStr(strGroups, lsn_Excecutive_group) Then
wshNetwork.MapNetworkDrive "X:","\\lsnsrv01\Excecutive\"
wshNetwork.AddWindowsPrinterConnection "\\lsnsrv01\LaserJet4000"
wshNetwork.AddWindowsPrinterConnection "\\lsnsrv01\3500Color"
wshNetWork.SetDefaultPrinter "\\lsnsrv01\2840Color"
ElseIf InStr(strGroups, lsn_Operations_group) Then
wshNetwork.MapNetworkDrive "O:","\\lsnsrv01\Operations\"
wshNetwork.AddWindowsPrinterConnection "\\lsnsrv01\LaserJet4000"
wshNetwork.AddWindowsPrinterConnection "\\lsnsrv01\3500Color"
wshNetWork.SetDefaultPrinter "\\lsnsrv01\2840Color"
ElseIf InStr(strGroups, lsn_Programming_group) Then
wshNetwork.MapNetworkDrive "P:","\\lsnsrv01\Programming\"
wshNetwork.AddWindowsPrinterConnection "\\lsnsrv01\LaserJet4000"
wshNetwork.AddWindowsPrinterConnection "\\lsnsrv01\3500Color"
wshNetWork.SetDefaultPrinter "\\lsnsrv01\2840Color"
End If
.
- Follow-Ups:
- Re: I need help with a login script
- From: John K
- Re: I need help with a login script
- References:
- I need help with a login script
- From: John K
- I need help with a login script
- Prev by Date: Re: Port Forwarding with 2x SBS 2003
- Next by Date: Re: Global Address List question
- Previous by thread: I need help with a login script
- Next by thread: Re: I need help with a login script
- Index(es):
Relevant Pages
|