A simpler approach to eliminate the delay of mapping drive for which shares do not exist and are not hidden would be to leverage the "Net View \\computer" command and wshpipe() the results into an array. You could check for the existance of the share prior to mapping the drive.
_________________________
Home page: http://www.kixhelp.com/hb/