We have this mundane process of creating new users at a client site, whereby the users H drive is manually created, some files copied from a template, then the profile is also copied, and using rmtshare it is shared out. All sounds ideal, and works, until you try and script the domain admins access for the users drive...

Everything works until the domain admins point:

SERVER1.KIX:
============

SHELL "net use b: \\server1\d$ /persistent:no"
? "USERNAME:"
GETS $UserName
$Selection = MESSAGEBOX ("Is the User Name $UserName", "Confirm User Name", 36)
If $Selection = 6
SHELL "XCOPY B:\USERS\TEMPLATE B:\USERS\" + $UserName + "/E /I /Q"
SHELL "XCOPY B:\PROFILES\template B:\PROFILES\" + $UserName + " /E /I /Q"
$FIRST="b:\rmtshare.exe \\UKEDEXH1\"
$SECOND="$=d:\users\"
$THIRD=" /grant "
$DOMAIN="DOMAIN\"
$FORTH=":FC"
$DOMAM="DOMAIN ADMINS"
$COMMAND1=$FIRST+$USERNAME+$SECOND+$USERNAME+$THIRD+$DOMAIN+$USERNAME+$FORTH
$COMMAND2=$FIRST+$USERNAME+$SECOND+$USERNAME+$THIRD+CHR(34)+$DOMAIN+$DOMAM+CHR(34)+FORTH
SHELL $COMMAND1
SHELL $COMMAND2
;shell "net use b: /delete"
Else

Endif
==========

Any help or pointers will be greatly appreciated...

Cheers.