You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
573 B
Perl

use Win32::EventLog;
$eventLog = Win32::EventLog->new('System') || die $!;
%eventRecord = (
'Source' => 0,
'Computer' => 0,
'Length' => 0,
'RecordNumber' => 0,
'TimeGenerated'=> 0,
'Timewritten' => 0,
'ClosingRecordNumber' => 0,
'Category' => 2,
'EventID' => 4242,
'EventType' => EVENTLOG_INFORMATION_TYPE,
'Strings' => "Used to identify the data",
'Data' => "Informational data about the message",
);
$eventLog->Report(\%eventRecord);