I need to query the registry on workstations for a binary value, and write
the results to a file (as a string). Here is my code and the spot where it
blows up because the result is not a string. Please help me! Thanks....
PKComputerIP="xxx.xxx.xxx.xxx"
Const HKEY_LOCAL_MACHINE = &H80000002
Set oReg=GetObject("winmgmts:\\" & PKComputerIP & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\EAPOL\Parameters\Interfaces"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
wscript.echo subkey
strSubKeyPath = strKeyPath & "\" & subkey
strValueName = "1"
oReg.GetBinaryValue HKEY_LOCAL_MACHINE,strSubKeyPath,strValueName,strValue
'ERROR IS IN THE NEXT LINE!***********************
wscript.echo strSubKeyPath & "=" & cstr(strValue)
Next