This code works. I have yet to test the LDAP:// provider.

Notice the difference of my use of "&40". I believe that you need to use the "VAL" function. Test and let me know.

code:
$Domain = "us-tyco-e"
$Account = "habtest1"

? "WinNT://$Domain/$Account,user"
$oAccount=getobject("WinNT://$Domain/$Account,user")
? @serror + " " +vartypename($oAccount)

$val=$oAccount.UserFlags
? @serror
? $Val

$Val = $val | val("&40")
? $Val

$oAccount.Put ("UserFlags", $Val )
? "setinfo " +@serror


$oAccount.SetInfo
? "setinfo " +@serror

? "WinNT://$Domain/$Account,user"
$oAccount=getobject("WinNT://$Domain/$Account,user")

$val=$oAccount.UserFlags
? @serror
? $Val



[ 26. August 2002, 01:33: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/