The below fragment uses Win32::Registry and shows the rgy locations.
CSDVersion is the service Pack Level in NT/2K. FWIW: Hfnetchk hasn't proved
reliable for us for hotfix info. The hfnetchk service pack reporting does
work and even distinguishes between 6 and 6a. Actually, the easiest and most
reliable way to distinguish between service packs and OS flavors is to use
kernel size and date info. Anyhow, here's the rgy based fragment:
if ($Root->Open('SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Windows', $hkey))
{
$hkey->Close();
# windows nt/2k
if ($Root->Open('SOFTWARE\Microsoft\Windows NT\CurrentVersion',
$hkey))
{
$hkey->QueryValueEx('CSDVersion', $type, $CSDVersion);
$hkey->QueryValueEx('CurrentVersion', $type,
$CurrentVersion);
$hkey->QueryValueEx('SystemRoot', $type, $SystemRoot);
$hkey->Close();
}
}
# windows 9x
elsif ($Root->Open('Software\Microsoft\Windows\CurrentVersion',
$hkey))
{
$hkey->QueryValueEx('Version', $type, $CurrentVersion);
$hkey->QueryValueEx('SystemRoot', $type, $SystemRoot);
$hkey->Close();
-----Original Message-----
From: Sherman Cerezo [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 17, 2002 10:03 AM
To: '[EMAIL PROTECTED]'
Subject: View service pack
Hi all,
Does anybody know a script that can check the service pack and
at the same token install the latest service pack.
I am wondering if this has to be done as a separate script...not so sure.
Thanks,
ShermanC
_______________________________________________
Perl-Win32-Admin mailing list [EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin