|
发表于 2013-5-2 15:00:52
|
显示全部楼层
判断一下kernel32.dll的版本号
#include <file.au3>
$arr = DriveGetDrive("FIXED")
$msg_str = ""
For $i = 1 To $arr[0]
$folder = _FileListToArray($arr[$i] & "\", "win*", 2)
If @error Then ContinueLoop
For $j = 1 To $folder[0]
$kernel_path = $arr[$i] & "\" & $folder[$j] & "\system32\kernel32.dll"
If FileExists($kernel_path) Then
$version = FileGetVersion($kernel_path)
$ver = StringLeft($version, 3)
Switch $ver
Case "5.0"
$msg_str &= $arr[$i] & " ---> Win2000" & @CRLF
Case "5.1"
$msg_str &= $arr[$i] & " ---> WinXP" & @CRLF
Case "5.2"
$msg_str &= $arr[$i] & " ---> Win2003" & @CRLF
Case "6.0"
$msg_str &= $arr[$i] & " ---> Vista" & @CRLF
Case "6.1"
$msg_str &= $arr[$i] & " ---> Win7" & @CRLF
EndSwitch
EndIf
Next
Next
MsgBox(0, "检测结果", $msg_str) |
|