Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8950827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:31:29+00:00 2026-06-15T13:31:29+00:00

I’ve recently discovered that you can use this to detect Windows versions: <!–[if WindowsEdition]>Blah<![endif]–>

  • 0

I’ve recently discovered that you can use this to detect Windows versions:

<!--[if WindowsEdition]>Blah<![endif]-->

But what values does WindowsEdition use?

Basically I’m trying to use a conditional comment to detect if users of Internet Explorer are on a Windows version that would support an upgrade to IE9 or above. I’d like to be able to detect the difference between “Windows XP and below” and “Windows Vista and higher”.

The purpose of this is to direct users of IE7 and below to either an update to IE9/10, or a switch to Chrome/Firefox if their OS doesn’t support IE9. The reason for doing this is that the site works in IE8, but lacks many CSS features so it is, in a few words, “ugly but usable”.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:31:31+00:00Added an answer on June 15, 2026 at 1:31 pm

    Only versions of Windows Vista or newer will return a value to the WindowEdition conditional comment.

    From the Conditional Comment Wikipedia page

    An integer corresponding to the edition of Windows used to view the Web page. Returns a Boolean value of true if the value matches the edition being used. For information about supported values and the editions they describe, see the pdwReturnedProductType parameter of the GetProductInfo function.

    emphasis is mine. By edition they mean Home, Home Starter, Professional, Ultimate, etc.

    The MSDN page for the GetProductInfo function supports this. The page also lists the input parameters for GetProductInfo which include

    dwOSMajorVersion [in]

    The major version number of the operating system. The minimum value is 6.

    Version 6 corresponds to Vista, so I suspect Windows XP and versions of Windows older than XP do not have this GetProductInfo function, cannot call it and won’t return anything to compare to the conditional comment in IE.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
This could be a duplicate question, but I have no idea what search terms
I know there's a lot of other questions out there that deal with this
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.