Here is a subroutine I use to write the User's name to the network neighborhood icon.[CODE];****************************************************************************************
:NETNEIGHBOR
; Description:
; Change the name of the "Network Neighborhood" icon to be the user's name. This
; provides a quick method for one to determine the name of the logged in user.
;
; Input:
; $HKLM_S (HKEY_LOCAL_MACHINE\Software), $nam(@FULLNAME), $rsz(REG_SZ)
;
; Output:
; None
;****************************************************************************************
; Modification History
; Date Initials Description
; 12 Aug 99 bvv Wrote first cut.
;****************************************************************************************
;
Dim $userfull, $keyclass, $keyroot, $temp, $returncode, $classname, $writname, $testvalue
$classname="'Network Neighborhood'"
$writname="user's name"
$testvalue=$nam+"'s Neighborhood"
$keyclass="{208D2C60-3AEA-1069-A2D7-08002B30309D}"
$keyroot=$HKLM_S+"Classes\CLSID\"
Gosub WRITECLASS
Return
;
:WRITECLASS
$key=$keyroot+$keyclass
$temp=ReadValue($key,"") ; Reads the "(Default)" value at the key.
? "The "+$classname+" name in: "+$key
? "is: "+$temp
If $temp<>$testvalue
$returncode=WriteValue($key,"",$testvalue,$rsz)
If $returncode=0
? "The "+$testvalue+" was written to: "+$key
Else
? "There was an error writing the "+$testvalue+" to: "+$key
? "The error code is: "+$returncode
Endif
Endif
Return[/CODE}
Regards,
Brad