Registry key for XP with SP2 pre-installed required

  • Thread starter Thread starter Sebastian Kinnaird
  • Start date Start date
S

Sebastian Kinnaird

I'm trying to configure a SCV script for a Checkpoint firewall to allow/deny
connections based on whether the end user has SP2 installed.

The set-up I've got works fine if an XP box has been upgraded to SP2 by
checking the relevant key, but if the XP box has come pre-installed with SP2
then the only unique item I can find is a value, rather than a key - making
the whole process a lot more difficult.

Does a unique key exist for systems that come with SP2 pre-installed?

Thanks in advance.

Seb
 
---sp_version_demo.VBS---cut here--
Set objWMIService =
GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery("Select * from
Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
Wscript.Echo "Service Pack " &
objOperatingSystem.ServicePackMajorVersion & "." &
objOperatingSystem.ServicePackMinorVersion
Next
--cut here----


..
 
Mark L. Ferguson said:
---sp_version_demo.VBS---cut here--
Set objWMIService =
GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery("Select * from
Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
Wscript.Echo "Service Pack " &
objOperatingSystem.ServicePackMajorVersion & "." &
objOperatingSystem.ServicePackMinorVersion
Next
--cut here----

Thanks, but... that's a VB script that can tell me what SP I'm running on a
Windows box, I don't see how it helps my particular situation. Does a
unique key exist in the registry of an XP box that comes pre-installed with
SP2?

At the moment, there's a unique value "Service Pack 2" under the key 'My
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\CSDVersion'.

I however, need a unique key as opposed to just a value to make this
particular script work. Does such a unique key exist?

Sorry if I didn't word my original query correctly.

Thanks,
Seb
 
Well, I'll search around, but I doubt my work would be any better than yours. Seems to me it's the 'uninstall' info that is the
difference. Perhaps a 'path to files' key of some kind (e.g. SFC's entry, see below), or the absence of an add/remove entry.

SFC's "Installation Path"
HKLM\Software\Microsoft\...

..Windows\Current Version\Setup
Service Source Path = ?

.Windows\Current Version\Setup
Source Path = ?

..WindowsNT\Current Version
Source Path = ?

(but I don't think this is going to have what you want, and)

Add/Remove, on the other hand, has :
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Windows XP Service Pack]
DisplayName = Windows XP Service Pack 2

Perhaps the absence or presence of this, along with the version info would tell you 'most of the time' anyway.
 
Back
Top