进一步验证把最近发的 一段判断C盘系统版本的代码改一下
;测试环境winxp
$vercode = ""
$sysver = ""
If (Not FileExists("C:\WINDOWS\syswow64"))And FileExists("C:\WINDOWS\system32\kernel32.dll") Then
$vercode = FileGetVersion("C:\WINDOWS\system32\kernel32.dll", "FileVersion")
Else
$vercode = FileGetVersion("C:\WINDOWS\syswow64\Wow64.dll", "FileVersion")
EndIf
$sysver = StringLeft($vercode, 3)
Switch $sysver
Case "5.0"
$sysver = "Win 2000"
Case 5.1;;;;;;这行改了,把字符串改成数值,也可以
$sysver = "Win XP"
Case "5.2"
$sysver = "Win 2003 server"
Case "6.0"
$sysver = "Vista"
Case "6.1"
$sysver = "Win7"
EndSwitch
If FileExists("C:\WINDOWS\syswow64") Then
$sysver &= " --- x64"
Else
$sysver &= " --- x86"
EndIf
MsgBox(0, "C盘系统为", $sysver)
|