分析作業系統版本的函式

2021-05-21 18:50:51 字數 1248 閱讀 9239

function getwindowsversion: string;  

varawin32version: extended;

os:string;

begin

os:='windows ';

awin32version := strtofloat(format('%d.%d' ,[win32majorversion, win32minorversion]));

if win32platform=ver_platform_win32s then

result := os + '32'

else if win32platform=ver_platform_win32_windows then

begin

if awin32version=4.0 then

result := os + '95'

else if awin32version=4.1 then

result := os + '98'

else if awin32version=4.9 then

result := os + 'me'

else

result := os + '9x'

endelse if win32platform = ver_platform_win32_nt then

begin

if awin32version=3.51 then

result := os + 'nt 3.51'

else if awin32version=4.0 then

result := os + 'nt 4.0'

else if awin32version=5.0 then

result := os + '2000'

else if awin32version=5.1 then

result := os + 'xp'

else if awin32version=5.2 then

result := os + 'server 2003'

else if awin32version=6.0 then

result := os + 'vista'

else if awin32version=6.1 then

result := os + '7'

else

result := os ;

endelse

result := os + 'unknown';

end;

前端獲取作業系統 作業系統版本

在做埋點的過程中,遇到要上傳作業系統和作業系統版本的需求,如下 通過n igator.useragent獲取首先將作業系統確定為如下對映 all os 獲取當前作業系統 獲取當前作業系統 export const getos if useragent.includes mac else if use...

linux檢視作業系統的版本

核心資訊 localhost.localdomain 所在主機的主機名,與主機配置檔案 etc hosts內容一致 2.4.20 8 1 核心版本號 thu mar 13 17 18 24 est 2003 系統啟動時間 i686 cpu指令集 athlon cpu廠商 i386 cpu架構 gnu...

檢視linux 作業系統版本

1.檢視核心版本命令 chen mylinuxserver cat proc version linux version 2.6.5 7.244 smp geeko buildhost gcc version 3.3.3 suse linux 1 smp mon dec 12 18 32 25 ut...