[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-win32-admin
Subject: AW: Machine Serial Number
From: "Manfred Maier" <Manfred.Maier () kmk-miller ! de>
Date: 2003-08-21 6:51:06
[Download RAW message or body]
Here is an example with texts in german. I think it won't be a problem
to translate this into your mother tongue.
Manfred
# BIOS_Daten.pl ermittelt verschiedene Datenm aus dem BIOS. Für dieses
# Programm sind Administratorrechte notwendig.
use Win32::OLE qw(in with);
$server = shift @ARGV || '.';
my $WMIServices =Win32::OLE->GetObject(
"winmgmts:{impersonationLevel=impersonate,(security)}//$server" );
$WMI = Win32::OLE->new('WbemScripting.SWbemLocator');
$Services = $WMI->ConnectServer($server);
print "BIOS-Daten für den Rechner: $server\n";
my $bios_set = $Services->InstancesOf("Win32_BIOS");
foreach my $bios (in($bios_set)) {
print "Überschrift : $bios->{'Caption'}'\n";
print "Versionsnummer: $bios->{'BuildNumber'}\n";
print "Sprache : $bios->{'CurrentLanguage'}\n";
print "Beschreibung : $bios->{'Description'}\n";
print "Installation : $bios->{'InstallDate'}\n";
print "Name : $bios->{'Name'}\n";
print "Hersteller : $bios->{'Manufacturer'}\n";
print "Modell : $bios->{'Model'}\n";
print "Primary BIOS : $bios->{'PrimaryBIOS'}\n";
print "Ausgabedatum : $bios->{'ReleaseDate'}\n";
print "Seriennummer : $bios->{'SerialNumber'}\n"; #
<<<<------------------
print "BIOS Version : $bios->{'SMBIOSBIOSVersion'}\n";
print "Hauptversion : $bios->{'SMBIOSMajorVersion'}\n";
print "Unterversion : $bios->{'SMBIOSMinorVersion'}\n";
print "SMBIOSPresent : $bios->{'SMBIOSPresent'}\n";
print "Element ID : $bios->{'SoftwareElementID'}\n";
print "Status : $bios->{'Status'}\n";
print "Version : $bios->{'Version'}\n";
}
my $wmi = Win32::OLE->GetObject ("winmgmts://$server/root/cimv2") or
die "Error - Failed to get WMI object\n",
Win32::OLE->LastError ();
my ($system) = (in $wmi->InstancesOf ('Win32_ComputerSystem'))
or die "Error - Failed to get Win32_ComputerSystem object\n",
Win32::OLE->LastError ();
my ($bios) = (in $wmi->InstancesOf ('Win32_BIOS'))
or die "Error - Failed to get Win32_BIOS object\n",
Win32::OLE->LastError ();
print <<"-- computer info --";
-- end
System \\$server:
Hersteller : @{[$system->{Manufacturer} || '<Unavailable>']}
Modell : @{[$system->{Model} || '<Unavailable>']}
Seriennummer : @{[$bios->{SerialNumber} || '<Unavailable>']}
-- computer info --
-----Ursprüngliche Nachricht-----
Von: James.Kipp@mbna.com [mailto:James.Kipp@mbna.com]
Gesendet: Mittwoch, 20. August 2003 18:23
An: Perl-Win32-Admin (E-mail)
Betreff: Machine Serial Number
Hi
Is it possible to get the machine serial number with one of the win32
modules? I tried going through the registry but could not find it. We
use Compaq laptops and I know the serial number is in there somewhere
because I can get it from a Compaq utility that is in the ctrl panel.
Thanks
_______________________________________________
Perl-Win32-Admin mailing list Perl-Win32-Admin@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
Perl-Win32-Admin@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic