Const HKEY_LOCAL_MACHINE = &H80000002
Const ForReading = 1
Dim shell
set shell=createobject("wscript.shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("c:\scripts\EPO.txt", ForReading)
Do Until objTextFile.AtEndOfStream
strComputer = objTextFile.Readline
Path = ("\\" & strComputer & "\c$\Program Files\Network Associates\Common
Framework\FrameworkService.exe")
version = objFSO.GetFileVersion (Path)
Text = "3.6.0.546"
If version = text Then
WScript.Echo "Versions are equal"
Else
WScript.Echo "Versions are not equal"
End If
Wscript.Echo strComputer & " EPO File Version is " & objFSO.GetFileVersion
(Path)
' ======================= Get McAfee Version ===============================
strKeyPath = "Software\McAfee\DesktopProtection"
strValueName = "szProductVer"
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
Set oService = oLocator.ConnectServer(Machine, "Root\DEFAULT", strAdminUser,
strAdminPass)
Set oRegistry = oService.Get("StdRegProv")
strKeyPath = "Software\McAfee\DesktopProtection"
strValueName = "szProductVer"
oRegistry.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath,
strValueName,strValue
WScript.Echo strComputer & " McAfee Version: " & strValue
Loop
objTextFile.Close
The Script run fineso far but I want to add the following:
If version = text Then
WScript.Echo "Versions are equal"
Else
run batch file on the remote machine --- I do not know how to excute a batch
file on the remote machine
End If