I finally decided to see if I could put to use the WMI registry provider since at work there are occasions with RAS clients that I can't get to their registry because network and file sharing is turned off but I can get to WMI.

I stole someone elses vbs code and started with EnumKey but I can't get any values back. I am hoping I am just tired and missing something because of that.

Has anyone tried this before? This is not finished by any means but here is what I have so far.
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
$HKCU = &80000001 ;HKEY_CURRENT_USER
$HKLM = &80000002 ;HKEY_LOCAL_MACHINE
$HKU = &80000003 ;HKEY_USERS
$HKCC = &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)
REDIM $Ret[UBound($sKeys)]
FOR $Count = 0 TO UBound($sKeys)
$Ret[$Count] = $sKeys[$Count]
NEXT
$fnEnumKey = Join($Ret, @CRLF)
ENDIF
ENDIF
ENDFUNCTION

_________________________
Kelly