Link to home
Start Free TrialLog in
Avatar of Richard2000
Richard2000

asked on

Detecting Windows XP 64-bit

Hi,

If possible, I would like to be able to use JavaScript to detect if the user is accessing the web page with specifically the 64-bit version of Windows XP, and display a message if this is the case (to display text that is specific to Windows XP 64-bit users only).

Could you please post some sample code to do this?  Perhaps it is possible to use an if statement to check the user agent for Windows XP 64-bit and render the text if found?

Thanks in Advance,

Richard
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi Richard2000,


The js object is called navigator. It contains many properties. I think the platform property is the best guess, but I don't know if windows xp 64 has anything different to windows xp normal.

Regards,

Richard Quadling.
Avatar of Richard2000
Richard2000

ASKER

Thanks for your reply.

Is there sufficient information in navigator (or anything else) to specificially detect the 64-bit version of Windows XP, with JavaScript?
ASKER CERTIFIED SOLUTION
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your code.  Unfortunately, I don't have Windows XP 64-bit to test it on.

I've looked at this page:
http://msdn.microsoft.com/workshop/author/dhtml/overview/aboutuseragent.asp

Not certain if this is relevant to JavaScript or not, but it says on the above page:
Win64 means "System has a 64-bit processor"

This seems to imply that the value platform returns applies to the processor rather than the OS, which may not give the intended result.  For example, a user could have a 64-bit processor, but only be running the regular 32-bit version of Windows XP.

Any ideas?
I think you need to find someone with a winXP64 and get them to run that script and let you know the output.

What you may find is that there is a particular plugin or extension which is only available on xp64. But I don't know anything else.

I think getting this tested on a 64 bit processor is the answer. If you are wanting to write code dependent upon the platform, you HAVE to test it!

I think a combination of cpuClass and platform to get your answer.

I feel enough was given to at least help the acheive the answer.

I have awarded the points to RQuadling for his help with the question.  Please note that since I don't own or have access to Windows XP 64-bit, I am unable to verify if it would produce the desired results (as discussed in my above comments).