WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Samples from Users
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Write to Event Log Using LogEvent Method

 Keywords: Event log eventlog write wsh  

;Type Value
;0 SUCCESS
;1 ERROR
;2 WARNING
;4 INFORMATION
;8 AUDIT_SUCCESS
;16 AUDIT_FAILURE

AddExtender("WWWNT34I.DLL")
cPop=wntUserInfo(0)
cDc=wntUserInfo(3)
cPC=Environment("COMPUTERNAME")

WshShell = CreateObject("WScript.Shell")
WshShell.LogEvent(0, "%cPop% Logged on via %cDC% on %cPC% ",cDc)

Article ID:   W17309
File Created: 2007:07:03:14:29:26
Last Updated: 2007:07:03:14:29:26