Microsoft Visual Basic
Microsoft Visual Basic is ideal for developing applications or prototypes.
To set up Visual Basic Project, follow this easy step-by-step instruction:
Launch Visual Basic.
Select the type of project you would like to create.
Select Project | References.
Make sure to check the Active DS type Library as shown below. If you don't need early COM object binding, this process is not necessary.
Now you're ready to start ADSI programming.
A simple Visual Basic sample: Modifying FullName and Description on a user
Before we start, you must log on to a Windows NT domain. You must also have permission to modify a Windows NT 4.0 directory database. Administrator, by default, has this privilege.
Follow steps above to create a standard executable VB project.
Double-click the Form.
On Form_Load, type:
'------------------------------------------------------------
' This program is used to set FullName and Description in a user
'------------------------------------------------------------
Dim usr As IADsUser
dom = "YOURDOMAIN" 'Replace with your domain
'----Binding to a user object
'----Note the ',user' is optional. It's used for performance
Set usr = GetObject("
WinNT://" & dom & "/Administrator")
usr.FullName = "James Smith"
usr.Description = "Administrator for " & dom
usr.SetInfo 'Commit the changes to DS