with regards to debugging i would suggest it is good practice to echo every thing, also dont use On Error Resume Next in the first instance (unless, as tsuji suggests, you might expect an error and you want to trap it)
Your use of
Set objOU=GetObject("LDAP://" & strOU)
is not needed, you are simply comparing strings you dont need this additional bind
Set objUser = GetObject(strUserPath)
Set objParent = GetObject(objUser.Parent)
Set objOU=GetObject("LDAP://" & strOU)
Wscript.Echo objParent.ADsPath & "=parent"
Wscript.Echo "LDAP://" & strOU
If strcomp(objParent.ADsPath,"LDAP://" & strOU,1)=0 Then
Wscript.echo "we have a match"
Set objGroup = GetObject("LDAP://" & strGroup)
Wscript.Echo "after bind to group"
wscript.echo objGroup.grouptype
on error resume next
'error checking as per tsuji's posts
objGroup.Add objUser.ADsPath
objGroup.SetInfo
on error goto 0
Set objGroup = Nothing
End If
more over, as tsuji suggests, why do it at logon? an admin script to enumerate all users in the OU and then add them to a group....
something like this might do the job
Set objOU=GetObject("LDAP://" & strOU)
Set objGroup = GetObject("LDAP://" & strGroup)
For Each aObject In objOU
'check its a user object???
objGroup.Add aObject.ADsPath
Next
Set objGroup = Nothing
Set objOU = Nothing