OK.. Here is what works.. Now, that we sorted out the "_" deal.

Note: The check for '$$' is really only needed when an Admin share is used and then it is executed.

Code:

; -- PURPOSE: Map user drives from an INI file and into an array
FUNCTION DRVMAP
DIM $rc,$data,$section,$grp,$value,$drive,$resource
$data=enumINI(@LDRIVE+'\NewScript\DRVMAP.ini')
IF @error
? "something went wrong: @serror"
SLEEP 2
ELSE
$rc=SETOPTION('NoVarsInStrings','Off')
FOR EACH $section IN $data
IF INSTR($section[0],',')
FOR EACH $grp IN SPLIT($section[0],',')
IF INGROUP($grp)
FOR $value=1 TO ubound($section)
$drive=$section[$value][0]
$resource=$section[$value][1]
IF INSTR($resource,'$$')
$rc=execute('$$resource='+$resource)
ENDIF
USE $drive+':' $resource
NEXT
ENDIF
NEXT
ELSE
IF INGROUP($section[0])
FOR $value=1 TO ubound($section)
$drive=$section[$value][0]
$resource=$section[$value][1]
IF INSTR($resource,'$$')
$rc=execute('$$resource='+$resource)
ENDIF
USE $drive+':' $resource
NEXT
ENDIF
ENDIF
NEXT
$rc=SETOPTION('NoVarsInStrings','On')
ENDIF
ENDFUNCTION



Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's