jasetechtt
asked on
login script not running properly with windows 2003
My login script does not run properly unless the user has admin rights
can anyone help me, i think the problem stems from the the join command in the script
Const LEGAL = "cn=legal"
Const ADMINISTRATOR = "cn=admin"
Const HUMAN_RESOURCES = "cn=hr"
Const estates = "cn=estates"
Set wshNetwork = CreateObject("WScript.Netw ork")
rem wshNetwork.MapNetworkDrive "t:", "\\amdk6\Users\" & wshNetwork.UserName
Set ADSysInfo = CreateObject("ADSystemInfo ")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.Mem berOf))
If InStr(strGroups, legal) Then
wshNetwork.MapNetworkDrive "l:", "\\amdk6\legalfolder"
wshNetwork.AddWindowsPrint erConnecti on "\\amdk6\hpbwexec"
wshNetwork.AddWindowsPrint erConnecti on "\\amdk6\hpbwgen"
wshNetWork.SetDefaultPrint er "\\amdk6\hpbwgen"
ElseIf InStr(strGroups, estates) Then
wshNetwork.MapNetworkDrive "l:", "\\amdk6\estates"
wshNetwork.AddWindowsPrint erConnecti on "\\PrintServer\hpbwnorth"
wshNetwork.AddWindowsPrint erConnecti on "\\amdk6\hpbwgen"
wshNetWork.SetDefaultPrint er "\\PrintServer\Hrbwnorth"
End If
can anyone help me, i think the problem stems from the the join command in the script
Const LEGAL = "cn=legal"
Const ADMINISTRATOR = "cn=admin"
Const HUMAN_RESOURCES = "cn=hr"
Const estates = "cn=estates"
Set wshNetwork = CreateObject("WScript.Netw
rem wshNetwork.MapNetworkDrive
Set ADSysInfo = CreateObject("ADSystemInfo
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.Mem
If InStr(strGroups, legal) Then
wshNetwork.MapNetworkDrive
wshNetwork.AddWindowsPrint
wshNetwork.AddWindowsPrint
wshNetWork.SetDefaultPrint
ElseIf InStr(strGroups, estates) Then
wshNetwork.MapNetworkDrive
wshNetwork.AddWindowsPrint
wshNetwork.AddWindowsPrint
wshNetWork.SetDefaultPrint
End If
ASKER
yes there is, thanks
I corrected that but the problem this persist
any more suggestions
I corrected that but the problem this persist
any more suggestions
ASKER
yes there is, thanks
I corrected the script but the problem still persist
post any suggestions
I corrected the script but the problem still persist
post any suggestions
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks it worked
I am just wondering... if my suggestion works, then why 'C' ?
https://www.experts-exchange.com/help.jsp#hi73
https://www.experts-exchange.com/help.jsp#hi73
ASKER
Well i am sorry i apologise i had to do some research myself, but you deserve a B
i have only now read how this this site grade the answers
accept my apology
i have only now read how this this site grade the answers
accept my apology
> wshNetwork.AddWindowsPrint
> wshNetWork.SetDefaultPrint
Is there a typo in your script: ...\hpbwnorth <-> ...\Hrbwnorth