$IDEkey="HKLM\SYSTEM\CurrentControlSet\Enum\PCIIDE\IDEChannel"
$ClassKey="HKLM\SYSTEM\CurrentControlSet\Control\Class"
dim $IDEch[1]
$n=0
While 1
$n=$n+1
$TEMP=RegEnumkey($IDEkey,$n)
MsgBox(0,"",$TEMP)
If @error <> 0 Then ExitLoop
ReDim $IDEch[UBound($IDEch)+1]
$IDEch[$n]=$TEMP
WEnd