I saw it and and am using it as a reference. I changed over to using the CINT() values. But, I believe the bigger problem is with getting the return value from EnumKey. The VBS code is Code:
oReg.EnumKey Key,SubKey, sKeys

. As we know, I can't get sKeys in kix with this syntax.

Code:
FUNCTION fnEnumKey($RegKey, $WMIRegComputerName)
DIM $HKCR, $HKCU, $HKLM, $HKU, $HKCC

; $HKCR = &80000000 ;HKEY_CLASSES_ROOT
$HKCR = CInt(2147483648.0) ;&80000000 ;HKEY_CLASSES_ROOT
; $HKCU = &80000001 ;HKEY_CURRENT_USER
$HKCU = CInt(2147483649.0) ;&80000001 ;HKEY_CURRENT_USER
; $HKLM = &80000002 ;HKEY_LOCAL_MACHINE
$HKLM = CInt(2147483650.0) ;&80000002 ;HKEY_LOCAL_MACHINE
; $HKU = &80000003 ;HKEY_USERS
$HKU = CInt(2147483652.0) ;&80000003 ;HKEY_USERS
; $HKCC = &80000005 ;HKEY_CURRENT_CONFIG
$HKCC = CInt(2147483653.0) ;&80000005 ;HKEY_CURRENT_CONFIG
DIM $Key, $SubKey
IF VarType($WMIRegComputerName) = 9
SELECT
CASE InStr($RegKey, "HKEY_CLASSES_ROOT") > 0 OR InStr($RegKey, "HKCR") > 0
$Key = $HKCR
IF InStr($RegKey, "HKCR") > 0
$SubKey = Split($RegKey, "HKCR\")[1]
ELSE
$SubKey = Split($RegKey, "HKEY_CLASSES_ROOT\")[1]
ENDIF
CASE InStr($RegKey, "HKEY_CURRENT_USER") > 0 OR InStr($RegKey, "HKCU") > 0
$Key = $HKCU
IF InStr($RegKey, "HKCU") > 0
$SubKey = Split($RegKey, "HKCU\")[1]
ELSE
$SubKey = Split($RegKey, "HKEY_CURRENT_USER\")[1]
ENDIF
CASE InStr($RegKey, "HKEY_LOCAL_MACHINE") > 0 OR InStr($RegKey, "HKLM") > 0
$Key = $HKLM
IF InStr($RegKey, "HKLM") > 0
$SubKey = Split($RegKey, "HKLM\")[1]
ELSE
$SubKey = Split($RegKey, "HKEY_LOCAL_MACHINE\")[1]
ENDIF
CASE InStr($RegKey, "HKEY_USERS") > 0 OR InStr($RegKey, "HKU") > 0
$Key = $HKU
IF InStr($RegKey, "HKU") > 0
$SubKey = Split($RegKey, "HKU\")[1]
ELSE
$SubKey = Split($RegKey, "HKEY_USERS\")[1]
ENDIF
CASE InStr($RegKey, "HKEY_CURRENT_CONFIG") > 0 OR InStr($RegKey, "HKCC") > 0
$Key = $HKCC
IF InStr($RegKey, "HKCC") > 0
$SubKey = Split($RegKey, "HKCC\")[1]
ELSE
$SubKey = Split($RegKey, "HKEY_CURRENT_CONFIG\")[1]
ENDIF
ENDSELECT

IF $Key <> "" AND $SubKey <> ""
DIM $Ret[0]
$sKeys = $WMIRegComputerName.EnumKey($Key, $SubKey)
? VarTypeName($sKeys)
? $sKeys
REDIM $Ret[UBound($sKeys)]
FOR $Count = 0 TO UBound($sKeys)
$Ret[$Count] = $sKeys[$Count]
NEXT
$fnEnumKey = Join($Ret, @CRLF)
ENDIF
ENDIF
ENDFUNCTION

_________________________
Kelly