(view source code of bios.pl as plain text)
#! perl
# WMI query to list all properties and values of the Win32_BIOS class
# This Perl script was generated using the WMI Code Generator, Version 1.30
# http://www.robvanderwoude.com/updates/wmigen.html
use Win32::OLE( 'in' );
use constant wbemFlagReturnImmediately => 0x10;
use constant wbemFlagForwardOnly => 0x20;
if ( $ARGV[0] ) {
$computer = $ARGV[0];
} else {
$computer = ".";
}
my $objWMIService = Win32::OLE->GetObject( "winmgmts://$computer/root/CIMV2" ) or die "WMI connection failed.\n";
my $colItems = $objWMIService->ExecQuery( "SELECT * FROM Win32_BIOS", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly );
foreach my $objItem ( in $colItems ) {
print "Name : " . $objItem->{ Name } . "\n";
print "Version : " . $objItem->{ Version } . "\n";
print "Manufacturer : " . $objItem->{ Manufacturer } . "\n";
print "SMBIOSBIOS Version : " . $objItem->{ SMBIOSBIOSVersion } . "\n";
print "\n";
}
page last modified: 2024-04-16; loaded in 0.0067 seconds