From: perl-win32-users-boun...@listserv.activestate.com 
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Ashley 
Hoff
Sent: 13 April 2011 07:56
To: perl-win32-users@listserv.ActiveState.com
Subject: Writing To Win Event Logs using Win32::EventLog


> Hello,
> First time reader, first time poster.
> I am trying to use Win32::EventLog to write out to the Windows Event Log (via 
> the $handle->Report() method)
> and am having issues with getting the description (as viewed by the windows 
> Event Viewer) right.
> Initially, I was getting the standard Windows message "The description for 
> Event ID ( n ) in Source ( My
> Source) cannot be found. The local computer may not have the necessary 
> registry information or message DLL
> files to display messages from a remote computer....." message.  I hacked the 
> registry under
> "Hkey_Local_Machine=>System=>CurrentControlSet=>Services=>EventLog=>Application=>My
>  Source" to include the
> following: EventMessageFile = %SystemRoot%\System32\EventCreate.exe.  (Well, 
> it wasn't really a hack.  In my
> Perl script, I sent a simple information event to the log, using EventCreate 
> via a cmd call, which registered > the above).
> While this has worked to get rid of the above message and the additional 
> information I want included, I am now > getting the box standard MS response 
> "For more information, see Help and Support Center at >
> http://go.microsoft.com/fwlink/events.asp.";  While this one is less confusing 
> then the above, it's probably
> something that I would rather not be there.
> I also tried to hack the registry using the PerlMsg.dll, but this didn't work 
> (I had a return to the original > message) and was simply a guess and a real 
> long shot.
> I am using the ActivePerl 5.8.9 distribution.  I also have PDK V9 available.  
> This is all installed on a
> Windows XP SP3 box.
> Does anyone have any advice/methods on getting exactly what I want written to 
> the Event Logs?
> Cheers and thanks in advance.
> Ashley

This link may help.

http://www.perlmonks.org/?node_id=737505

HTH


--
Brian Raven




Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient or have received this e-mail in error, please advise 
the sender immediately by reply e-mail and delete this message and any 
attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to