|
If
your running Win2k you can use WMI. It correctly differentiates between server,
advanced server and professional versions (I don't have
datacenter).
The
registry values seem to simply tell you that you are running Win2k not which
version.
hth,
-Andrew
<CODE>
use strict;
use warnings; use Win32::OLE qw( in ); use Win32::OLE::Variant; my $host = shift @ARGV ||
Win32::NodeName();
my $WMI; eval { my $class = "WinMgmts:{impersonationLevel=impersonate}!//$host"; unless ($WMI = Win32::OLE->GetObject( $class )) { print "Error creating WMI Object on $host \n"; } ## WMI
looks good so execute the OS query
my $OSdata = $WMI->ExecQuery("SELECT * FROM Win32_OperatingSystem"); foreach my $item (in $OSdata) { print "$host is running $item->{Caption} - $item->{Version}\n"; } }; print "$host die with WMI Error\n" if $@; </CODE>
This message is for the named recipient only. It may contain confidential, proprietary or legally privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by email and delete the original message from your computer. We reserve the right to monitor all email communications. Although we believe this email and any attachments are virus-free, we do not guarantee that it is virus-free, and we accept no liability for any loss or damage arising from its use. GREENPOINT |
- MS Win 2K Version LViale - TiscaliNet
- RE: MS Win 2K Version Geaslin, Andrew - GPB
- RE: MS Win 2K Version Steven Manross
