如何判断当前操作系统是否为98/2000/XP,如何判断当前操作系统是否为98/2000/XP
【 tulaoshi.com - ASP.NET 】
方法1.environment env
integer resp
string temp,ls_version
resp = getenvironment(env)
choose case env.ostype
case aix!
temp = 'AIX'
case hpux!
temp = 'HPUX'
case macintosh!
temp = 'MacIntosh'
case osf1!
temp = 'OSF1'
case sol2!
temp = 'Solaris 2'
case Windows!
temp = 'Windows'
case Windowsnt!
temp = 'Windows NT'
end choose
ls_version = temp + ' '+string(env.osmajorrevision)+'.'+string(env.osminorrevision)+'.'+string(env.osfixesrevision)
messagebox("Windows version",ls_version)
Long L1
dec{2} ldc_WinVer
string ls_WinVer
L1 = GetVersion()
ldc_WinVer = MOD(intlow(L1),256) + int(intlow(L1)/256)/100
choose case ldc_WinVer
case 3.10
ls_WinVer = "Windows 3.x"
case 4
ls_WinVer = "Windows NT 4.0"
case 4.10
ls_WinVer = "Windows 98"
case 5
ls_WinVer = "Windows 2000"
case 5.01
ls_WinVer = "Windows XP"
case 5.02
ls_WinVer = "Windows 2003"
end choose
messagebox("Windows version",ls_WinVer)
// Function: gf_getos()
// Description: Get current Os name
// Arguments: value integer
// Returns: string
// 95-98 : Windows
// 2000- : WindowsNT
// Else : ""
// Author:Kilojin Date: 2005.02.14
// Modify History:
//
environment env
integer rtn
rtn = GetEnvironment(env)
IF rtn < 1 THEN RETURN ""
CHOOSE CASE env.OSType
CASE Windows!
// Windows 95 or 98 code
return "Windows"
CASE WindowsNT!
// Windows NT-specific code
return "WindowsNT"
CASE Sol2!
IF env.OSMinorRevision = 5 THEN
RETURN ""
ELSEIF env.OSMinorRevision = 6 THEN
// Solaris 2.6 code
RETURN ""
END IF
CASE ELSE
RETURN ""
END CHOOSE
来源:http://www.tulaoshi.com/n/20160129/1490926.html
看过《如何判断当前操作系统是否为98/2000/XP》的人还看了以下文章 更多>>