I am writing a web page where an administrator can log on and add/delete/modify users. The creation of a user works fine with the following code....
Dim oDomain, oUser,UserName
set oDomain = GetObject("WinNT://Paperless")
UserName = Trim(Request.Form("lblUsr"))
set oUser = oDomain.Create("User",UserName)
Here's my question (so far)
I need to add the groups to this user that had been created...
lblPW is the user's password (previous form)
lblUsr is the user's login Name (previous form)
I have the main group which is drpLevel (drop box from previous form)
and also a bunch of groups which is C1 (checkboxes previous form)
The adding the users works fine, but they must be in the groups. I put the value in the checkbox on the previous form, but I am having a tough time figuring out how to add them to the groups. I found on a PAQ the following code...
Dim Group as IADsGroup
Set Group = GetObject("WinNT://MyDomain/Groups/Administrators")
the error I got was the Dim Group Decloration (error '80005000')
I figure why this didn't work was because I may not have set up the ADSI correctly, or I haven't installed another component. (I replaced the Remove above with Add, but never got to that point with the error on Dim Group line.
I hope that's enough information.