wolfess
04-21-2005, 02:12 PM
Hi,
I need to re-write our organization's logon in script which is written totally in command line to a more intelligent login script using VBcript. I'm new to programming in VBscript, but not new to programming.
Anyway, I need to iterate the security group membership list for a user and make decision based on what security groups the user belongs to. The below code snippet:
' The below code is for determining Group membership
Set objADSystemInfo = CreateObject("ADSystemInfo")
strUserDN = objADSystemInfo.UserName
Set objUser = GetObject("LDAP://" & strUserDN)
For Each strGroup in objUser.MemberOf
Wscript.Echo strGroup.Name
Next
...gets the following error:
Script: D:\$$Logon_Script\GroupMemberShip.vbs
Line:6
Char:1
Error: 0x80005000
Code: 80005000
Source: Null
So, what doesn't the scripting engine like about:
<Set objUser = GetObject("LDAP://" & strUserDN)>?
I'm running this script on a Win2000Pro machine that is fully patched.
Any and all guidance is gratefully appreciated.
Steve
I need to re-write our organization's logon in script which is written totally in command line to a more intelligent login script using VBcript. I'm new to programming in VBscript, but not new to programming.
Anyway, I need to iterate the security group membership list for a user and make decision based on what security groups the user belongs to. The below code snippet:
' The below code is for determining Group membership
Set objADSystemInfo = CreateObject("ADSystemInfo")
strUserDN = objADSystemInfo.UserName
Set objUser = GetObject("LDAP://" & strUserDN)
For Each strGroup in objUser.MemberOf
Wscript.Echo strGroup.Name
Next
...gets the following error:
Script: D:\$$Logon_Script\GroupMemberShip.vbs
Line:6
Char:1
Error: 0x80005000
Code: 80005000
Source: Null
So, what doesn't the scripting engine like about:
<Set objUser = GetObject("LDAP://" & strUserDN)>?
I'm running this script on a Win2000Pro machine that is fully patched.
Any and all guidance is gratefully appreciated.
Steve