#60453 - 2001-11-08 01:04 AM
UserCreate() UDF
|
Bryce
KiX Supporter
   
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
UserCreate.kixcode:
Function UserCreate($target,$user,OPTIONAL $rightstouse) ;UserCreate Function ; ;Syntax: ; UserRename(<Domain/computer>,<userid>,[rights to use]) ; <domain/computer> = the domain or computer you want to create a new account in ; <userid> = the name of the account to create ; [rights to use] = optional user name and password used to make the account ; ;Examples: ; ;This will create a user account called "thing1" in the local domain ; UserCreate(@domain,"Thing1") ; ; ;This will create a user account called thing2 on the workstation ; ;beanbag in the kixtart domain ; usercreate("kixtart/beanbag","thing2") ; ; ;This will create a user account called thing3 on the workstation ; ;beanbag in the kixtart domain, using the local Administrator account ; usercreate("kixtart/beanbag","thing2","beanbag\administrator|password") if $rightstouse $rightstouse = split($rightsToUse,"|") if ubound($rightstouse) <> 1 exit(1) endif ? $rightstouse[0] ? $rightstouse[1] if instr($target,"/") <> 0 $target = getobject("WinNT:").OpenDSObject("WinNT://$target,computer",$rightstouse[0],$rightstouse[1], 2) if @error <> 0 and vartype($target) <> 9 exit(@error) endif else $target = getobject("WinNT:").OpenDSObject("WinNT://$target",$rightstouse[0],$rightstouse[1],2) if @error <> 0 and vartype($target) <> 9 exit(@error) endif endif else if instr($target,"/") <> 0 $target = getobject("WinNT://$target,computer") if @error <> 0 and vartype($target) <> 9 exit(@error) endif else $target = getobject("WinNT://$target") if @error <> 0 and vartype($target) <> 9 exit(@error) endif endif endif $user = $target.create("user","$user") if @error <> 0 and vartype($user) <> 9 exit(@error) endif $user.setinfo exit(@error) endfunction
|
|
Top
|
|
|
|
#60456 - 2001-11-08 03:32 AM
Re: UserCreate() UDF
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11631
Loc: CA
|
I agree also. And let's talk Les in to getting a MS Messenger account
|
|
Top
|
|
|
|
#60457 - 2001-11-08 07:23 AM
Re: UserCreate() UDF
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,It is a good idea, but .... - how prevent we a chaos? who will monitor the input of topics?
f.e. other boards are removing unwanted topics from their forums and they let the member know which forum he should use for his request. a suggestion: one or more active members becomes moderator from this new forum and they will read the information and they will close a topic when necessary to prevent a very long discussion. - topics code can't easily transfer to your environment. f.e. indentations are
gone. so scripts must also put somewhere on internet in plain text format. a suggestion: the site http://kixscript.isorg.net will have a place for those scripts. - sometimes a script is in development and a lot of members are reacting on.
is this what we want in this new forum? reactions are no problem on other forums. a suggestion: the moderator(s) will close topics must faster to prevent such discussions.
greetings. btw: Bryce, your scripts are very usefull.
|
|
Top
|
|
|
|
#60458 - 2001-11-08 11:31 AM
Re: UserCreate() UDF
|
Anonymous
Anonymous
Unregistered
|
I agree with this suggestion. It's hard to find a script or UDF of your needs.If there's a need for a moderator, I'm open for it.
|
|
Top
|
|
|
|
#60463 - 2001-11-08 04:56 PM
Re: UserCreate() UDF
|
Anonymous
Anonymous
Unregistered
|
It's there a dedicated UDF forum, moderated by MartijnL (thanks!)Henri
|
|
Top
|
|
|
|
#60471 - 2001-11-09 03:12 AM
Re: UserCreate() UDF
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Hey ceej, how about scripting some DirectX games - maybe with a little DirectAnimation, delicately wrapped in Internet Explorer, with a milk chocolately KiXtart center ?code:
break on $ie = createobject("internetexplorer.application")
$ie.navigate("about:blank") while $ie.busy and @error=0 loop
$html = '<'+'OBJECT ID="DAControl" STYLE="position:absolute; left:0; top:0;width:800;'+ 'height:300;z-index: -1" CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D"'+'>'+ '<'+'/OBJECT'+'>'
$ie.document.write("$html")
$ie.visible = 1
$dacontrol = $ie.document.all("dacontrol") $m = $dacontrol.meterlibrary
; Create an animated color
$half = $m.danumber("0.5") $clr = $m.colorhslanim($m.mul($m.localtime, $m.danumber("0.345")),$half, $half)
; Contstruct a 12pt font and a text image
$font = $m.font("Arial", 11, $clr) $txtimg = $m.stringimage("KiXtart 2001 - A Scripting Odessey", $font)
; Move the text image across the page
$pos = $m.mul($m.sin($m.localtime), $m.danumber("0.02")) $scl = $m.add($m.danumber("2"), $m.abs($m.mul($m.sin($m.localtime), $m.danumber("3")))) $xf = $m.compose2($m.translate2anim($m.danumber("0"), $pos), $m.scale2uniformanim($scl)) $txtimg = $txtimg.transform($xf)
; Assign the animation back to the control and start it
$dacontrol.image = $txtimg $dacontrol.start
gets$ exit 1
Code adapated from the DirectAnimation SDK  -Shawn [ 09 November 2001: Message edited by: Shawn ] [ 09 November 2001: Message edited by: Shawn ]
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 578 anonymous users online.
|
|
|