Where are using this function
Code:

Function fnInGroupAD($sGroup,Optional $bComputer)
Dim $objSys,$objTarget,$aMemberOf,$sMemberOf
$objSys = CreateObject("ADSystemInfo")
$objTarget = GetObject("LDAP://"+Iif($bComputer,$objSys.ComputerName,$objSys.UserName))
$aMemberOf = $objTarget.GetEx("memberOf")
For Each $sMemberOf in $aMemberOf
If InStr($sMemberOf,"CN="+$sGroup+",")
$fnInGroupAD = Not 0
Exit
EndIf
Next
$fnInGroupAD = NOT 1
EndFunction



Also why are using quotes around your Vars here...
Code:

AddToMyNetworkPlaces('$ShareName','$SharePath','$Comment')

_________________________
Today is the tomorrow you worried about yesterday.