Detect for Windows XP Service Pack 2

Is there any way, in any prominant web language, to detect whether or not a user is running Windows XP Service Pack 2?  Personally, I would prefer a response for PHP, ASP, or JavaScript, but any language would be interesting (even ActionScript, if possible).  The main problem with SP2 is that since it does not allow you to hide the status bar on a popup window, which takes away 29 pixels of viewable space, some content in height-specific popup windows gets covered up, which can be a problem if scrolling is disabled for the window.  Thanks!
dizee44Asked:
Who is Participating?
 
weddellConnect With a Mentor Commented:
You can use window.navigator.userAgent to detect if the browser connecting to your site is Internet Explorer in SP2.

var g_fIsSP2 = false;

function browserVersion()
{
  g_fIsSP2 = (window.navigator.userAgent.indexOf("SV1") != -1);
  if (g_fIsSP2)
    {
      //This browser is Internet Explorer in SP2.
    }
  else
    {
      //This browser is not Internet Explorer in SP2.
    }
}

If the user agent string contains "SV1", the browser connecting to your site is Internet Explorer in SP2.

An example SP2 user-agent string looks like this: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

0
 
mosphatCommented:
I'm running Windows XP SP2 and have no problem creating a popup without a status bar. Where did you get this info that it's not possible?
0
 
dizee44Author Commented:
If you don't mind me asking, do you have any security features of SP2 turned off?  Could you please send me a link to a popup that you've created that doesn't display a popup?  The reason I've read it's being done is so the user can always see where the page is linking to.  SP2 also seems to change the title bar of all popups that don't have a location bar to display the domain of the site the page is on.  Here is just one of many places I've found where people are having the same problem: http://www.annoyances.org/exec/forum/winxp/t1092876003.  I've also read rumors that Mozilla is thinking of doing the same thing: http://www.neilturner.me.uk/2003/Dec/16/stopping_the_status_bar.html.  What I was hoping to do is detect when a browser is running SP2, and add 29 pixels to the size of the popup, so at least the content doesn't get covered up, but I doubt I'd be able to do anything about the title bar.  Thanks again for anyone's help.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
mosphatCommented:
I didn't turn off any security features and used a script like this:
<script>
var test = window.open("test", "", "status=0");
</script>
But obviously the problem does exist for some people, as can be read on those links. Unfortunately I have no idea how one could fine out whether someone has sp2 installed or not. Maybe someone else does?
0
 
dizee44Author Commented:
I tried running the same script you used straight from my desktop, and noticed that it did hide the status bar on the popup, BUT, when I uploaded it to my site and launched the popup from there, it forced the status bar to display again.  I'm assuming this has to do with security levels from different "zones" in IE's options, which force the status bar while anywhere on the internet... I think detecting for SP2 and adding 29 pixels to the height of the window might be the only way to go on this...
0
 
dizee44Author Commented:
Awesome!  I noticed that that in PHP also.  Thanks for everybody's help!
0
All Courses

From novice to tech pro — start learning today.