dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: How to detect VISTA OS using VB.Net

  1. #1
    Join Date
    Jun 2008
    Location
    Romania
    Posts
    4

    How to detect VISTA OS using VB.Net

    I'm loooking for a solution of detecting the VISTA OS using VB.Net. I need it because I have a problem with one of my websites (which was designed especially for Vista) when it is displayed in a browser in XP, so I can load a different stylesheet.

    Thank you in advance

  2. #2
    Join Date
    Jun 2008
    Posts
    2
    It may not be the best solution because it is possible to spoof the useragent but you can use navigator.userAgent to check for the 'Windows NT 6.0' string.

  3. #3
    Join Date
    Jun 2008
    Posts
    2
    You could use javascript and check navigator.userAgent for 'Window NT 6.0' or you could try to use System.Environment.OSVersion
    Last edited by mark_W; 06-24-2008 at 05:30 PM.

  4. #4
    Join Date
    Jun 2008
    Location
    Romania
    Posts
    4
    Quote Originally Posted by mark_W
    You could use javascript and check navigator.userAgent for 'Window NT 6.0' or you could try to use System.Environment.OSVersion
    I knew about navigator.userAgent but I didn't want to rely solely on javascript (you know, many visitors don't have js enabled in their browsers).

    but the System.Environment will soon become my new best friend!

    Thank you very much, Mark.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles