Thx for your speed reply Bryce
I'm working with NT 4.0 servers and Win2k clients w/ Kix 3.63...Here's what I'm trying to do:
1) Chk for home dir (hd); if HD does not exist, then create one (set as P: drive); if it exists=exit
2) Once HD is created, set HD attributes to @ldomain\Domain Admins and @userid FULL ACCESS.Per Shawn's gracious illustrations, yours and others, I came up with this:
break on
; Set Variables
$server = "@lserver"
$domain = "@ldomain"
$userfolder = "data"
$share_loc = "\\ + $server + \ + $userfolder"
$share_name = "@userid"
$share_maxusercount = 2
$homedirpath = $share_loc + @userid
$share_description = "@userid's home directory"
$file = "homedirs.txt"
;ADSI Chk
$lms = olegetobject ( 0, "WinNT://$server/lanmanserver" )
if $lms = 0
goto finish
Endif
;Chk for home directory existence
$homedirdrive = "P:"
$domain = olegetobject (0, "WinNT://$domain")
$domain.filter = "user",""
If $shareloc + @userid = ""
go to create
Else (MessageBox, "Home Directory Already Exists","")
EndIf
:create
$share = val ( "&" + olecallfunc ( $lms, "create", "ss", "fileshare", "$sharename" ) )
$rs = oleputproperty ( $share, "loc", "s", "$shareloc" )
$rs = oleputproperty ( $share, "maxusercount", "s", "$share_maxusercount" )
$rs = oleputproperty ( $share, "description", "s", "$share_description" )
$rs = olecallproc ( $share, "setinfo" )
if @error
?"Error @error : @serror"
goto finish
endif
:finish
if $share
$rs = olereleaseobject ( $share )
endif
if $lms
$rs = olereleaseobject ( $lms )
endif
Goto home
; Set Home Dir Attributes
:home
$NUL = OPEN(1,$FILE,2)
$username = READLINE(1)
DO
if exist("$homedirpath")=0
md "$homedirpath"
if @error=0
$sm=sendmessage("$server","Home Directory created at $homedirpath for @userid")
SHELL "%comspec% /c echo y| cacls $homedirpath /t /c /g fdhc\@userid:c"
SHELL "%comspec% /c echo y| cacls $homedirpath /t /e /c /g "@ldomain\Domain Admins:f"
SHELL "%comspec% /c echo y| cacls $homedirpath /t /e /c /g "mis:f"
else
sendmessage("$server","Home Folder was NOT created at $homedir for @userid")
endif endif
? $USERNAME
$USERNAME = readline(1)
until @error<>0
$nul = close(1)
EXIT
My questions are these:
1) Will this work, lol?
2) How would I go about outputing the results to a text file?
3) Do you have any suggestions to make this better?
Thx for taking the time to help, it is greatly appreciated 
[ 31 October 2001: Message edited by: garion ]