JustScriptIt
Technical User
Hello,
I've been researching a way to read the value of the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC
Where the value I want to read is ProductVersion
So far, I am trying it on my own computer where I can SEE that the value exists, yet it is coming as blank.
Can you see the code I have so far and tell me what I am missing:
I've been researching a way to read the value of the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC
Where the value I want to read is ProductVersion
So far, I am trying it on my own computer where I can SEE that the value exists, yet it is coming as blank.
Can you see the code I have so far and tell me what I am missing:
Code:
Option Explicit
Dim strComputer, strKeyPath, strValueName, oReg, strValue
const HKEY_LOCAL_MACHINE = &H80000001
strComputer = "."
Set oReg=GetObject( _
"winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Symantec\Symantec Endpoint Protection\SMC"
strValueName = "ProductVersion"
oReg.GetStringValue _
HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Wscript.Echo "Current SEP Version: " & strValue