attiahia,
no silly question here, only someone who is seeking for knowledge
Nothing in the Shawn's example have to be changed.

For the following line :
$sysinfo = createobject("adsysteminfo")
Adsysteminfo is an AD object. It's the name you have to use to call it.
$Sysinfo is a handle to adsysteminfo (in fact, a clone of it, as you'll never be allowed by the system to get your hand on the orignal object, only a memory copy stored in a variable)
The Adsysteminfo object has multiple properties and method. They are called like this :
$Object_Handle.property
$Object_Handle.method("parameters")
Actually, the most used properties are :
.Username
.Computername
.GetAnyDC (not really sure of the correct syntax)

Beware, ADsysteminfo isd dependant of the current user on the current workstation.
The respective values will be different with another user or computer

.Username will return the following value :
CN=Current User Name,OU=Test,OU=Messaging,DC=zain,DC=com

.Computername will return the following value :
CN=Current Computer Name,OU=Test,DC=zain,DC=com
(all are examples, of course)

For $user = getobject("LDAP://"+$sysinfo.username)
In fact, this is exactly the same :
$user = getobject("LDAP://CN=Current User Name,OU=Test,OU=Messaging,DC=zain,DC=com")

The $User variable will be the current user, but as an object, so with methods and properties. In your case, the user object we'll get have the AccountDisable property.

Everything you need, no ?
And as i don't think you'll do this with the user code and password you want to disable, here's what you need
a copy/paste will be enough :

code:

$user = GetObject("LDAP:// CN=noor NIaa.,OU=Test,OU=Messaging,DC=zain,DC=com")
$user.AccountDisabled = 1 ;disabled the account
$user.SetInfo ; Needed to update the new informations


after, only have to wait the time AD Server will take to replicate the change

[ 30 December 2001: Message edited by: Alex.H ]

_________________________
? getobject(Kixtart.org.Signature)