Doesn't this SHELL '%COMSPEC% /c NET USE $DriveLetter>c:\temp\NetUSe_$DriveLetterCHAR.dat' need additional spaces around the '>'?
code:
SHELL '%COMSPEC% /c NET USE '+$DriveLetter+' > c:\temp\NetUSe_'+$DriveLetterCHAR+'.dat'

You should also properly format strings with quotes and indent your code in order to make it more readable.

[ 12. September 2002, 18:25: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.