You can use the following code:
(works only from version 3.37 and higher)

code:

$Drive = "G:" $Path = "\\server\%username%$" GOSUB "MapDrive"

goto "final"

:MapDrive

If @INWIN = 1
USE $Drive /d
EndIf

USE $Drive $Path

If @ERROR <> 0
? "Error Code :" +@ERROR
EndIf

RETURN

:final


This script is also very good if you want to map other share's !!

------------------
Lon Geefshuysen (MCP)
kixtart.to/lon
lon@kixtart.to