Here it is and it works. You can look at this page dealing with jscript, . http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/writing_wmi_scripts_in_jscript.asp Code:
$Computer = "Computer"
$WMIRegComputer = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" + $Computer + "\root\default:StdRegProv")

$Registry = "\\" + $Computer + "\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WBEM"

$RC = fnEnumKey($Registry, $WMIRegComputer)
? UBound($RC)
? Join($RC, @CRLF)

QUIT 1

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, $Ubound
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 <> ""
$objMethod = $WMIRegComputerName.Methods_.Item("EnumKey")
$objInParam = $objMethod.InParameters.SpawnInstance_()
$objInParam.hDefKey = $Key
$objInParam.sSubKeyName = $SubKey
$objRegOut = $WMIRegComputerName.ExecMethod_($objMethod.Name,$objInParam)
$sKeys = $objRegOut.sNames
FOR EACH $KeyName IN $sKeys
$Ubound = UBound($sKeys)
IF $sKeys[$Ubound] > " "
$Ubound = $Ubound + 1
REDIM PRESERVE $sKeys[$Ubound]
ENDIF
$sKeys[$Ubound] = $KeyName
NEXT
$fnEnumKey = $sKeys
ENDIF
ENDIF
ENDFUNCTION

_________________________
Kelly