| REM **********************************************************
REM OS バージョンの取得
REM **********************************************************
Function GetOSVersion( )
GetWmi("Wmi")
Dim colTarget,str,aData,I,nTarget
Set colTarget = Wmi.ExecQuery( "select Version from Win32_OperatingSystem" )
For Each objRow in colTarget
str = objRow.Version
Next
aData = Split( str, "." )
For I = 0 to Ubound( aData )
if I > 1 then
Exit For
end if
if I > 0 then
nTarget = nTarget & "."
end if
nTarget = nTarget & aData(I)
Next
GetOSVersion = CDbl( nTarget )
End Function
| |