Hi,

I've found this UDF:

 Code:
 
Dim $sRootKey
$sRootKey="HKCU\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts\"
 
Dim $asSub,$sSub, $asSpl, $sSpl
 
	$asSub=ReadRegValArr($sRootKey)
		For Each $sSub in $asSub
		$asSpl = Split($sSub, "\")[3]
			;For Each $sSpl in $asSpl
		"	Printer: "+$asSpl[3]+@CRLF
			;Next
		Next

Exit 0
   
Function ReadRegValArr($sKey)
	Dim $i,$sSubKey
 	Redim $ReadRegValArr[0]
 	$i=0
	$sSubKey=EnumValue($sKey,$i)	
	While Not @ERROR
		ReDim Preserve $ReadRegValArr[$i]
		$ReadRegValArr[$i]=$sSubKey		
		$i=$i+1
		$sSubKey=EnumValue($sKey,$i)	
	Loop
	If @ERROR=259 Exit 0 Else Exit @ERROR EndIf
EndFunction



Now the problem I'm having is with the split function.

How do I declare or use split to only show the last part of the string? so it only shows the printername and not the server name

regards