henry isham wrote:
> Hi All,
>
> I'm trying to find a way to query the local machine to find out whether it's running
> Windows 2000 Professional/XP/Windows 2000 server. I've looked into the
> HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion key, but it doesn't tell whether
> it's a Pro or Server version. Does anyone know of a way to query the machine for
> this kind of detail? I'd really appreciate any help with this. Thanks!
use Win32;
my %maj_min_id = (
3 => { 51 => { 0 => 'Windows NT 3.51' }, },
4 => { 0 => { 1 => 'Windows 95',
2 => 'Windows NT 4.0' },
10 => { 1 => 'Windows 98' },
90 => { 1 => 'Windows Me' }, },
5 => { 0 => { 2 => 'Windows 2000' },
1 => { 2 => 'Windows XP' },
2 => { 2 => 'Windows Server 2003' }, },
);
my ($str, $maj, $min, $bld, $id) = Win32::GetOSVersion();
print "\nOS Version = $maj_min_id{$maj}{$min}{$
--
,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED]
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs