_______________________________

From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
Michael Cohen
Sent: August-19-09 5:40 PM
To: perl-win32-users@listserv.ActiveState.com
Subject: Determining Vista Editions



>>To whomever knows the answer: 

>>I have been using the Win32::GetOSVersion() function for many years in
order to pull the Windows OS level.  However, I now have a new need to
determine whether or not the OS is Windows Vista Home Basic (or for that
matter, other various editions).

[snip]

>>Is there a better way to get this information instead of using the
GetProductInfo() command from the "kernel32" DLL? 


Better?? Likely not. I could not make the GetProductInfo API work either.
Instead perhaps you can just read the registry.

#!/usr/bin/perl -w 
use strict;
use Win32::TieRegistry;
$Registry->Delimiter("/");
my $edition = $Registry->{"LMachine/Software/Microsoft/"}->
                      {"Windows NT/CurrentVersion//EditionID"}
              or  die "Can't find Edition ID: $^E\n";
print $edition;
__END__


Jack

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to