Lonkero,

If may not be the best...but here is the code for the WinXP part of the YAMD Function. It does not change icon however, I am not sure if XP even allows that.

code:
FUNCTION YAMD($DRIVELETTER, $UNC, optional $LABEL, optional $ICON, optional $DELETE)
DIM $DI, $HEXCHAR, $HEXLABEL, $LABELKEY, $LABELPATH, $LOOP, $OS, $SUBCMD, $TIMEOUT, $UNCASCCHAR, $UNCASCLABEL

$TIMEOUT=0
$LABELPATH=""
$DI="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons"
$LABELKEY="HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer"

SELECT
CASE @PRODUCTTYPE = "Windows XP Professional" $OS="WinXP" $SUBCMD="NET USE"
CASE @PRODUCTTYPE = "Windows 2000 Professional" $OS="Win2K" $SUBCMD="NET USE"
CASE @PRODUCTTYPE = "Windows NT Workstation" $OS="WinNT" $SUBCMD="SUBST"
ENDSELECT

SHELL '%COMSPEC% /C $SUBCMD $DRIVELETTER: /D 1>NUL 2>&1'

IF $DELETE
IF $OS="Win2k"
$=DELTREE("$LABELKEY\MountPoints\$DRIVELETTER")
$=DELTREE("$DI\$DRIVELETTER")
RETURN
ENDIF
ENDIF

SHELL '%COMSPEC% /C $SUBCMD $DRIVELETTER: "$UNC" 1>NUL 2>&1'

IF EXIST("$DRIVELETTER:\")=0
RETURN
ENDIF

IF $OS="Win2k"
IF $ICON
$=ADDKEY("$DI\$DRIVELETTER")
$=ADDKEY("$DI\$DRIVELETTER\DEFAULTICON")
$=ADDKEY("$DI\$DRIVELETTER\DEFAULTLABEL")
$=WRITEVALUE("$DI\$DRIVELETTER\DEFAULTICON","","$ICON",REG_SZ)
$=WRITEVALUE("$DI\$DRIVELETTER\DEFAULTLABEL","","$LABEL",REG_SZ)
ELSE
$=DELTREE("$DI\$DRIVELETTER")
ENDIF

IF $LABEL
FOR $LOOP = 1 TO LEN($LABEL) ; ******* Parse the label and convert to hex string
$HEXCHAR=DECTOHEX(ASC(SUBSTR("$LABEL",$LOOP,1)))
$HEXLABEL=$HEXLABEL+$HEXCHAR+"00"
NEXT

WHILE LEN($HEXLABEL) < 128 ; ******* Buffer the hex string to 128 characters
$HEXLABEL=$HEXLABEL+"00"
LOOP

$RC=WRITEVALUE("$LABELKEY\MountPoints\$DRIVELETTER","BaseClass","Drive",REG_SZ)
$RC=WRITEVALUE("$LABELKEY\MountPoints\$DRIVELETTER\_LABELFROMREG","CACHE","$HEXLABEL",REG_BINARY)
SLEEP 5
$RC=WRITEVALUE("$LABELKEY\MountPoints\$DRIVELETTER\_LABELFROMREG","VERSION","3",REG_DWORD)
$RC=WRITEVALUE("$LABELKEY\MountPoints\$DRIVELETTER\_LABELFROMREG","CACHE","$HEXLABEL",REG_BINARY)
ENDIF

ENDIF

IF $OS="WinXP"
IF $LABEL
FOR $LOOP = 1 TO LEN($UNC)
$UNCASCCHAR=SUBSTR("$UNC",$LOOP,1)

IF $UNCASCCHAR="\"
$UNCASCCHAR="#"
ENDIF

$UNCASCLABEL=$UNCASCLABEL+$UNCASCCHAR
NEXT


$RC=WRITEVALUE("$LABELKEY\MountPoints2\$UNCASCLABEL","_LABELFROMREG","$LABEL",REG_SZ)

ENDIF

ENDIF

ENDFUNCTION

I have been trying to make the Win2K part work in our environment so that is why is not the same as in the UDF Library.