Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alerta en Asyncronous string data (async_string)
#5
Hola Buenas Tardes, Agradezco su ayuda, lo solucione con el siguiente vbs

Set objShell = CreateObject("Wscript.Shell")

strCmdRun = "cmd /c "
strRegQ = "reg query "
strRegKey12 = """HKLM\SOFTWARE\Symantec\Symantec Endpoint Protection\CurrentVersion"""
strRegKey12DEF = """HKLM\SOFTWARE\Symantec\Symantec Endpoint Protection\CurrentVersion\SharedDefs"""
strCmdSw = " | FIND "
strRegKey2 = """PRODUCTVERSION"""
strRegKey1DEF = """DEFWATCH_10"""

Dim objShell,objDef,objDate,objVer,objRev,objOutFile,objFSO,objNDate

Set objExec12 = objShell.Exec(strCmdRun & strRegQ & strRegKey12 & strCmdSw & strRegKey2)
Set objExec12DEF = objShell.Exec(strCmdRun & strRegQ & strRegKey12DEF & strCmdSw & strRegKey1DEF)

strExecResults = Lcase(objExec12.StdOut.readline)
strExecResultsDEF = Lcase(objExec12DEF.StdOut.readline)

objVersion = mid (strExecResults, 33,4)

Wscript.StdOut.WriteLine "<module>"
Wscript.StdOut.WriteLine "<name>Symantec_Version</name>"
Wscript.StdOut.WriteLine "<description>Version de Symantec Endpoint Protection</description>"
Wscript.StdOut.WriteLine "<type>generic_data</type>"
Wscript.StdOut.WriteLine "<data>" & objVersion & "</data>"
Wscript.StdOut.WriteLine "</module>"

objDEFDate = mid (strExecResultsDEF, 129,8)
objDEFDate =right (objDEFDate ,2)&"/"&mid (objDEFDate,5,2)&"/"& left (objDEFDate,4)
Wscript.StdOut.WriteLine "<module>"
Wscript.StdOut.WriteLine "<name>Symantec_Date_Definiciones</name>"
Wscript.StdOut.WriteLine "<description>Definiciones de Symantec Endpoint Protection</description>"
Wscript.StdOut.WriteLine "<type>async_string</type>"
Wscript.StdOut.WriteLine "<data>" & objDEFDate& "</data>"
Wscript.StdOut.WriteLine "</module>"

if datediff("d",objDEFDate ,date()) >=3 then

Wscript.StdOut.WriteLine "<module>"
Wscript.StdOut.WriteLine "<name>Symantec_Status</name>"
Wscript.StdOut.WriteLine "<description>Symantec Endpoint Protection Actualizado</description>"
Wscript.StdOut.WriteLine "<type>generic_proc</type>"
Wscript.StdOut.WriteLine "<data>0</data>"
Wscript.StdOut.WriteLine "</module>"

else

Wscript.StdOut.WriteLine "<module>"
Wscript.StdOut.WriteLine "<name>Symantec_Status</name>"
Wscript.StdOut.WriteLine "<description>Symantec Endpoint Protection Actualizado</description>"
Wscript.StdOut.WriteLine "<type>generic_proc</type>"
Wscript.StdOut.WriteLine "<data>1</data>"
Wscript.StdOut.WriteLine "</module>"

end if

Saludos desde Mexico
 Reply
Messages In This Thread
Re: Alerta en Asyncronous string data (async_string) - by jorge.loyola - 03-20-2015, 08:48 PM


Users browsing this thread: 1 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes