View Full Version : Registry key for XP with SP2 pre-installed required
Sebastian Kinnaird
January 14th 05, 08:13 PM
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
--
Sebastian Kinnaird
Mark L. Ferguson
January 14th 05, 10:38 PM
---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 (NOT an MS-MVP)
FAQ for MS AntiSpy http://www.geocities.com/marfer_mvp/FAQ_MSantispy.txt
marfers notes for windows xp
http://www.geocities.com/marfer_mvp/chatNotes.htm
..
"Sebastian Kinnaird" > wrote in message
...
> 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
> --
> Sebastian Kinnaird
>
Sebastian Kinnaird
January 14th 05, 11:44 PM
"Mark L. Ferguson" > wrote in message
...
> ---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\Win dows
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
--
Sebastian Kinnaird
Mark L. Ferguson
January 15th 05, 01:12 PM
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\Curr entVersion\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.
--
Mark L. Ferguson (NOT an MS-MVP)
FAQ for MS AntiSpy http://www.geocities.com/marfer_mvp/FAQ_MSantispy.txt
marfers notes for windows xp http://www.geocities.com/marfer_mvp/chatNotes.htm
..
"Sebastian Kinnaird" > wrote in message ...
> "Mark L. Ferguson" > wrote in message ...
>> ---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\Win dows
> 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
> --
> Sebastian Kinnaird
>
vBulletin® v3.6.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.