Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Local x
x = 1
Create Cursor eventlogs (categorie N(10),;
nomordi c(20),Code N(10),Message m,;
nRecno N(10),Source c(50),dateheure T,Type c(20),usager c(20))
lcComputer = "."
loWMIService = Getobject("winmgmts:" ;
+ "{impersonationLevel=impersonate}!\\" + lcComputer + "\root\cimv2")
colRetrievedEvents = loWMIService.ExecQuery ;
("Select * from Win32_NTLogEvent")
For Each loEvent In colRetrievedEvents
Wait Window Transform(x) Nowait
Insert Into eventlogs (categorie,nomordi,Code,Message,nRecno,;
source,dateheure,Type,usager) Values
(loEvent.Category,loEvent.ComputerName,;
loEvent.EventCode,Transform(loEvent.Message),loEvent.RecordNumber,loEvent.So
urceName,;
WMIDateStringToDate(loEvent.TimeWritten),
loEvent.Type,Transform(loEvent.User))
x = x + 1
Next
Function WMIDateStringToDate(dtmDate)
WMIDateStringToDate = Ctot(Substr(dtmDate, 5, 2) + "/" + ;
Substr(dtmDate, 7, 2) + "/" + Left(dtmDate, 4) ;
+ " " + Substr(dtmDate, 9, 2) + ":" + ;
Substr(dtmDate, 11, 2) + ":" + Substr(dtmDate, ;
13, 2))
Return WMIDateStringToDate
Endfunc