Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Check Registry Value exists Remote Computers

$
0
0

I have the below code which checks the registry for a specifc value (Hotfix_778101), I need to get it to read a list of servers from a txt file and check on each of the servers whetehr the value exists, and wirte to a output txt file with whther it does exist or not,  any help? thanks

Const HKEY_LOCAL_MACHINE = &H80000002

strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & _
    strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Wow6432Node\McAfee\DesktopProtection"
strValueName = "Hotfix_778101"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue

If IsNull(strValue) Then
    Wscript.Echo "The registry key does not exist."
Else
    Wscript.Echo "The registry key exists."
End If


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>