Tony White wrote:
> 
> Whew!  I thought this was an easy one, but I just spent nearly an hour
> finding out *any* way to find this out.  And here it is:
> 
> Look at the contents of the following registry value:
> 
> HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/ProductOptions/ProductTy
> pe
> 
> It will have one of 3 values:
> 
> WinNT   -- Workstation (or Professional for Win2K)
> ServerNT        -- Server
> LanmanNT        -- "Advanced Server" (but I found this on an NT PDC, too)

Thanks, Tony!

As a summary for those interested, I put together this little script:

--------------------------------------------------
use Win32;

# compare various OS info:

print "\$^O = '$^O'\n";
my @osinfo = Win32::GetOSVersion();
print "Win32::GetOSVersion() = '@osinfo'\n";
@osinfo = Win32::GetOSName();
print "Win32::GetOSName() = '@osinfo'\n";

use Win32::TieRegistry;
my $producttype = 

$Registry->{'HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\ProductOptions\\\\Product

Type'};
print
"HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/ProductOptions\\ProductType
= 

'$producttype'\n";
--------------------------------------------------

on my machine (W2K Professional SP3) this produces:

$^O = 'MSWin32'
Win32::GetOSVersion() = 'Service Pack 3 5 0 2195 2'
Win32::GetOSName() = 'Win2000 Service Pack 3'
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/ProductOptions\ProductType
=
 'WinNT'

Cheers.

-- 
Alan F. Dickey - Interaction and Realization
http://www.intac.com/~afdickey
mailto:[EMAIL PROTECTED]
VOX: 908-273-3232 Cell: 908-334-0932

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to