NTDOC:
I'm sure the code I posted is okay becasue it's the production code in my automated shared user folders creations cript.
AnalogKid2112:
Of cource you will need to adapt the code to your environment.
$username mustr be set to the username that you want to create the directory for
$userdir is the local directory that will become the user directory
$rmtsharebin is the complete path to RMTSHARE.EXE including double quotes if theere are spaces in the pathname
$caclsbin is the complete path to CACLS.EXE including double quotes if theere are spaces in the pathname
%COMSPEC% is a DOS variable that gets resolved to the command interpreter, e.g. c:\winnt\system32\cmd.exe on Windows NT
If you modify the script by inserting
code:
? $shellcommand
in the line above each SHELL command, it'll print out the contents of the $shellcommand variable. Make sure that the pathnames for the .EXEs are correct and post the contects of $shellcommand. I can then take a look and see what might be wrong. I am suspecting that you don't reference the two .EXEs correctly and the script can't find them which would explain the error.
_________________________
There are two types of vessels, submarines and targets.