(view source code of getres.pl as plain text)
#! perl
# WMI query to list all properties and values of the Win32_DisplayConfiguration 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_DisplayConfiguration", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly );
foreach my $objItem ( in $colItems ) {
print "Device Name : " . $objItem->{ DeviceName } . "\n";
print "Pels Width : " . $objItem->{ PelsWidth } . "\n";
print "Pels Height : " . $objItem->{ PelsHeight } . "\n";
print "Bits Per Pel : " . $objItem->{ BitsPerPel } . "\n";
print "Display Frequency : " . $objItem->{ DisplayFrequency } . "\n";
print "\n";
}
page last modified: 2024-04-16; loaded in 0.0069 seconds