Quantcast
Channel: Ivanti User Community: Message List
Viewing all articles
Browse latest Browse all 12704

Re: Custom definition, ReadRegValue won't read from HKEY_CLASSES_ROOT\CLSID\

$
0
0

My solution:

 

'Detect scripts must call Report with a true or a false to indicate whether detected or not.
On Error Resume Next
Dim WSHShell, HKCR2
Set WSHShell = CreateObject("WScript.Shell")

'Log "DCMS Reg Detect VBScript"

'Read Registry
HKCR2 = WSHShell.RegRead("HKEY_CLASSES_ROOT\CLSID\{E845C3BF-A5B4-11D2-A409-0004AC3A8F96}\InprocServer32")

Log "Reg Values"
Log "HKCR2: " & HKCR2
Log "-------------"


if HKCR2 <> "\\\\SERVER\\PATH\\DCMS\\File.dll" then
Log "Patch Required"
   Report True,"Expected Val:\\\\SERVER\\PATH\\DCMS\\File.dll","Registry Key Check Fail","Data Incorrect"
ELSE
Log "Patch Installed"
  Report False,"Expected Val:\\\\SERVER\\PATH\\DCMS\\File.dll","Check Pass","Data Correct"
end if


Viewing all articles
Browse latest Browse all 12704

Trending Articles