Sunday, August 27, 2023

Write and Add event into application log

Set objShell = WScript.CreateObject("Wscript.Shell")

' 0, 1 , 2 , 4 .... are the types of Events like Error event, Information event, Success event...
objShell.LogEvent 0,"Test Success Event"

objShell.LogEvent 1,"Test Error Event"

objShell.LogEvent 2,"Test Warning Event"

objShell.LogEvent 4, "Test Information Event"

objShell.LogEvent 8, "Test Success Audit Event"

objShell.LogEvent 16, "Test Failure Audit Event"

No comments:

Post a Comment

DLL Register

  'On Error Resume Next dim objRun,objCmd,quote,path,fname msgbox"Hi Sh1" quote=chr(34) Set objRun = CreateObject(...