ASP to judge the client operating system

Source: Internet
Author: User

Determining client operating Systems
Function Getos (Content,systemorbrowser)
Dim Temp
temp = Split (content, ";")
Select Case Systemorbrowser
Case 0
If InStr (Content, "Windows NT 6.0") Then
Getos = "Windows Vista"
ElseIf InStr (Content, "Windows NT 5.2") Then
Getos = "Windows 2003"
ElseIf InStr (Content, "Windows NT 5.1") Then
Getos = "Windows XP"
ElseIf InStr (Content, "Windows NT 5.0") Then
Getos = "Windows 2000"
ElseIf InStr (Content, "Windows NT") Then
Getos = "Windows NT"
ElseIf InStr (Content, "Windows 9") Then
Getos = "Windows 9x"
ElseIf InStr (Content, "Unix") Then
Getos = "Unix"
ElseIf InStr (Content, "Linux") Then
Getos = "Linux"
ElseIf InStr (Content, "SunOS") Then
Getos = "SunOS"
ElseIf InStr (Content, "BSD") Then
Getos = "BSD"
ElseIf InStr (Content, "Mac") Then
Getos = "Mac"
Else
Getos = "Other"
End If
Case 1
If InStr (content, "Opera") Then
Getos = Replace (Left (content,instr (content, "()-1),"/"," "
ElseIf InStr (content, "MSIE") > 0 Then
Getos = Trim (temp (1))
Else
Getos = Replace (Right (temp (4), Len (Temp (4))-InStrRev (Temp (4), "")), "/", "" "
End If
End Select
End Function

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.