Does this work on NT but not on Win9x? Do you use the KXRPC service? Is this a global or local group?
Extra info: http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=1;t=006785#000001
Try not including the "=1" in the ingroup line.
code:
IF INGROUP ("sales")
$t = "Connecting drive I:" GOSUB text
USE I: /DELETE
USE I: "\\myt-1001\sales" GOSUB err
$t = "Connecting drive J:" GOSUB text
USE J: /del /persistent
USE J: "\\myt-1001\market" GOSUB err
ENDIF
Else
? "Not is the SALES group"
ENDIF
or id you use the MapDrive UDF: code:
IF INGROUP ("sales")
MapDrive ("I:", "myt-1001", "sales")
MapDrive ("J:", "myt-1001", "market")
Else
? "Not is the SALES group"
ENDIF
Function MapDrive($Drive, $Server, $Share)
Dim $Drive, $Server, $Share
Color c+/n
If $Drive<>"" and $Server<>"" and $Share<>""
$LogText="Connecting $Drive to \\$Server\$Share"
? $LogText
USE $Drive /Delete /Persistent
USE $Drive "\\$Server\$Share"
If @error=0
color g+/n
$x=" - Success"
"$x"
Else
color r+/n
$x=" - Failed: Error @error"
"$x"
$ErrorState=1
Endif
WriteLog ($LogText + $x)
Color w+/n
Else
WriteLog ("Function 'MapDrive' called with invalid parameters: '$Drive', '$Server', '$Share'")
Endif
Endfunction
[ 11. March 2003, 21:40: Message edited by: Howard Bullock ]