Heres the Function:

 Code:
 
FUNCTION gci_mapdrive ($letter, $share)

   IF $letter<>"*"

      $letter=$letter+":"

      USE $letter /DELETE
      IF @ERROR<>0
         $logprintline="ERROR Deleting existing mapping   " + @ERROR + " / " + @SERROR + "  input is " + $letter
      ELSE
         $logprintline="Success  Deleting existing mapping  " + @RESULT + "  input is " + $letter
      ENDIF
   
      $X = WRITELINE(1,"GCI " + $logprintline + @CRLF)

   ENDIF

   USE $letter $share
   IF @ERROR<>0
      $logprintline="ERROR  New mapping  " + @ERROR + " / " + @SERROR + "  input is " + $letter + " " + $share
   ELSE
      $logprintline="success  New mapping  " + @RESULT + "  input is " + $letter + " " + $share
   ENDIF

   $gci_mapdrive=$logprintline

   $X = WRITELINE(1,"GCI " + $logprintline + @CRLF)
   ? "Mapping  : input is " + $letter + " " + $share
EndFunction


What I mean for all users, is anyone that logs into our domain is getting the same mapped network drives the ones in this part of the script:


 Code:
SELECT
   case INGROUP("students")
      $icsstudentprefix=LEFT(@USERID,2)
      SELECT
         case $icsstudentprefix="s-"
            $x=gci_mapdrive("U","\\ICS08\"+@USERID+$hide)
            $x=gci_mapdrive("V","\\ICS04\student")
            $x=gci_mapdrive("w","\\ICS04\icsstudent")
	    
         case 1
            ;for non ics student-teacher logons
	    $x=gci_mapdrive("U","\\ICS02\"+@USERID+$hide)
;           $x=gci_mapdrive("U","\\ICS04\"+@USERID+$hide)
            $x=gci_mapdrive("V","\\ICS04\student")
	    $x=gci_mapdrive("w","\\ICS04\icsstudent")
            $x=gci_mapdrive("S","\\ICS08\SAM2003")
      ENDSELECT



I'm not quite sure how to check the debugging on it, I haven't learned that yet \:\(


Edited by BMartynowicz (2008-09-26 07:54 PM)