You could use Win32::TieRegistry to get a listing of
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog\(Application|S
ecurity|System).
Use something like this:
<code>
use Win32::TieRegistry;
$EventLogRegPath = "\\System\\CurrentControlSet\\Services\\EventLog\\";
$LogList = $Registry->{HKEY_LOCAL_MACHINE . "$EventLogRegPath"} or die "\nI
can't open the registry path: $!\n";
foreach $logKey (keys %$LogList) {
if(substr($logKey,-1) eq '\\') { # keys end in "\", values start
with "\"
$logKey = substr($logKey,0,length($logKey)-1); # to remove
the trailing "\"
print "\n$logKey";
}
}
</code>
-----Original Message-----
From: Michael D. Schleif [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 1:21 PM
To: perl-win32-admin List Service
Subject: How to list EventLogs on given server ???
Now that w2k encourages a multiplicity of EventLogs beyond Application,
Security & System, what is the most efficient way to list these on any
given system?
Currently, we have seen these:
Application
Directory Service
DNS Server
File Replication Service
IExplore
System
Security
Using Perl, on any given w2k box, how can we list which EventLogs are
resident?
We have studied Win32::EventLog and Win32::Lanman. Although, both will
parse any of these EventLogs if explicitly given the EventLog name, we
do not see anyway for either module to list resident EventLogs.
What do you think?
--
Best Regards,
mds
mds resource
888.250.3987
"Dare to fix things before they break . . . "
"Our capacity for understanding is inversely proportional to how much we
think we know. The more I know, the more I know I don't know . . . "
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin