@leomoon: This will help #Include <Array.au3> $aComPort = _GetComPortNames() _ArrayDisplay($aComPort) Func _GetComPortNames() ;funkey 2010, Nov 29th Local $objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2") Local $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_PnPEntity WHERE Name LIKE '%COM%'", "WQL", 48) Local $sRet = "" For $objItem In $colItems $sRet &= $objItem.Name & @CR Next Return StringSplit(StringTrimRight($sRet, 1), @CR, 2) EndFunc @martin: Than