DBD::WMI

Interface to the Windows WMI
Download

DBD::WMI Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Max Maischein
  • Publisher web site:
  • http://search.cpan.org/~corion/

DBD::WMI Tags


DBD::WMI Description

Interface to the Windows WMI DBD::WMI is a Perl interface to the Windows WMI.ABSTRACTThis module allows you to issue WQL queries through the DBI.SYNOPSIS use DBI; my $dbh = DBI->connect('dbi:WMI:'); my $sth = $dbh->prepare(fetchrow) { my $proc = $row->; print join " ", $proc->{Caption}, $proc->{ExecutablePath} || ""; # $proc->Terminate(); print " "; }The WMI allows you to query various tables ("namespaces"), like the filesystem, currently active processes and events: SELECT * FROM Win32_ProcessThe driver/WMI implements two kinds of queries, finite queries like the query above and potentially infinite queries for events as they occur in the system: SELECT * FROM __instanceoperationevent WITHIN 1 WHERE TargetInstance ISA 'Win32_DiskDrive'This query returns one row (via ->fetchrow_arrayref() ) whenever a disk drive gets added to or removed from the system (think of an USB stick).There is currently no support for selecting specific columns instead of *. Support for selecting columns that then get returned as plain Perl scalars is planned.DBD::WMI::db::parse_columns STATEMENTThis routine parses out the requested columns from the WQL statement and returns an array reference with the names of the columns.Currently, this only works for SELECT statements. All other statements get an implicit column of *, meaning that the Win32::OLE objects will be returned. Requirements: · Perl


DBD::WMI Related Software