137 lines
5.4 KiB
HTML
137 lines
5.4 KiB
HTML
<html>
|
|
<HEAD>
|
|
<TITLE>Windows Management Instrumentation (WMI) CIM Studio</TITLE>
|
|
<SCRIPT LANGUAGE="VBS">
|
|
<!--
|
|
Sub Window_onLoad()
|
|
Dim iMajorVersion
|
|
|
|
On Error Resume Next
|
|
|
|
' Get the major and minor IE version
|
|
|
|
' Get the version from the user agent by looking for MSIE
|
|
msie = CInt(Instr(1, window.navigator.userAgent,"MSIE", 1))
|
|
|
|
' Version is just past it
|
|
i = msie + 5
|
|
|
|
' Get more string than we need
|
|
strVersion = Mid(window.navigator.userAgent, i, 7)
|
|
|
|
' Find the dot as in 4.01;
|
|
iDot = instr(1, strVersion, ".", 1)
|
|
|
|
' Yea, we get it as a string
|
|
strMajorVersion = mid(strVersion ,1, iDot - 1)
|
|
|
|
' Convert to integer
|
|
iMajorVersion = CInt(strMajorVersion)
|
|
|
|
' Find the semicolon
|
|
iSemi = instr(Cint(iMajorVersion), strVersion, ";", 1)
|
|
|
|
' Ditto it is a string
|
|
strMinorVersion = mid(strVersion, iDot, iSemi - iDot)
|
|
|
|
' Convert to single
|
|
sMinorVersion = CSng(strMinorVersion)
|
|
|
|
|
|
if Not (VarType(iMajorVersion) = vbInteger or VarType(sMinorVersion) = vbSingle) Then
|
|
MsgBox "You must upgrade to Internet Explorer 4.01 or greater. It can be downloaded from http://www.microsoft.com/windows/ie."
|
|
Exit Sub
|
|
End If
|
|
|
|
If iMajorVersion < 4 Then
|
|
MsgBox "You must upgrade to Internet Explorer 4.01 or greater. It can be downloaded from http://www.microsoft.com/windows/ie."
|
|
Exit Sub
|
|
End If
|
|
|
|
If IMajorVersion = 4 and sMinorVersion < .01 Then
|
|
MsgBox "You must upgrade to Internet Explorer 4.01 or greater. It can be downloaded from http://www.microsoft.com/windows/ie."
|
|
Exit Sub
|
|
End If
|
|
|
|
' The 'LoginComponent' member of Security should contain build info in the form
|
|
' "...some text... (Core_Build=xxx SDK_Build=yyy)" where xxx and yyy are floating
|
|
' point numbers
|
|
strBldInfo = top.frames("StudioBannerFrame").Security.LoginComponent
|
|
|
|
' Get offset and length of core build string. Convert this to a 'single' value
|
|
' Default the build number to 1.0 if we can't get it from the string
|
|
iOffsetCoreBld = instr(1, strBldInfo, "Core_Build=", 1) + 11
|
|
iCountCoreBld = instr(iOffsetCoreBld, strBldInfo, " ", 1) - iOffsetCoreBld
|
|
|
|
' It's possible that the build string only contains the core build "(Core_Build=xxx)"
|
|
' In this case, we need to look for the trailing ')'
|
|
If iCountCoreBld < 1 Then
|
|
iCountCoreBld = instr(iOffsetCoreBld, strBldInfo, ")", 1) - iOffsetCoreBld
|
|
End If
|
|
|
|
sCoreBld = 1.0
|
|
strCoreBld = ""
|
|
If iOffsetCoreBld > 11 and iCountCoreBld > 0 Then
|
|
strCoreBld = mid(strBldInfo, iOffsetCoreBld, iCountCoreBld)
|
|
sCoreBld = CSng(strCoreBld)
|
|
End If
|
|
|
|
' Get offset and length of SDK build string. Convert this to a 'single' value
|
|
' Default the build number to 1.0 if we can't get it from the string
|
|
iOffsetSDKBld = instr(1, strBldInfo, "SDK_Build=", 1) + 10
|
|
iCountSDKBld = instr(iOffsetSDKBld, strBldInfo, ")", 1) - iOffsetSDKBld
|
|
sSDKBld = 1.0
|
|
strSDKBld = ""
|
|
If iOffsetSDKBld > 10 and iCountSDKBld > 0 Then
|
|
strSDKBld = mid(strBldInfo, iOffsetSDKBld, iCountSDKBld)
|
|
sSDKBld = CSng(strSDKBld)
|
|
End If
|
|
|
|
If sCoreBld = 1.0 and sSDKBld = 1.0 Then
|
|
strMsg = "Neither the WMI SDK tools build number," + chr(10)
|
|
strMsg = strMsg + "nor the core WMI components build could be determined." + chr(10)
|
|
strMsg = strMsg + "The tools may not function as expected." + chr(10)
|
|
strMsg = strMsg + "See http://msdn.microsoft.com/developer/sdk/wmisdk/default.asp for current versions."
|
|
MsgBox strMsg,, "Possible Version Incompatibility"
|
|
ElseIf sSDKBld = 1.0 Then
|
|
strMsg = "The WMI SDK tools build number could not be determined." + chr(10)
|
|
strMsg = strMsg + "The core WMI components build number is " + strCoreBld + "." + chr(10)
|
|
strMsg = strMsg + "The tools may not function as expected." + chr(10)
|
|
strMsg = strMsg + "See http://msdn.microsoft.com/developer/sdk/wmisdk/default.asp for current versions."
|
|
MsgBox strMsg,, "Possible Version Incompatibility"
|
|
ElseIf sCoreBld = 1.0 Then
|
|
strMsg = "The core WMI components build number could not be determined." + chr(10)
|
|
strMsg = strMsg + "The WMI SDK tools build number is " + strSDKBld + "." + chr(10)
|
|
strMsg = strMsg + "The tools may not function as expected." + chr(10)
|
|
strMsg = strMsg + "See http://msdn.microsoft.com/developer/sdk/wmisdk/default.asp for current versions."
|
|
MsgBox strMsg,, "Possible Version Incompatibility"
|
|
ElseIf sCoreBld < 1085.0 or sCoreBld >= 1100.0 or sCoreBld >= (sSDKBld+1.0) Then
|
|
strMsg = "The WMI SDK tools (build " + strSDKBld + ") are possibly incompatible" + chr(10)
|
|
strMsg = strMsg + "with the core WMI components (build " + strCoreBld + ")." + chr(10)
|
|
strMsg = strMsg + "The tools may not function as expected." + chr(10)
|
|
strMsg = strMsg + "See http://msdn.microsoft.com/developer/sdk/wmisdk/default.asp for current versions."
|
|
MsgBox strMsg,, "Possible Version Incompatibility"
|
|
End If
|
|
|
|
top.frames("ClassnavFrame").ClassNavigator.OnReadySignal
|
|
End Sub
|
|
|
|
Sub Window_onbeforeUnload()
|
|
On Error Resume Next
|
|
top.frames("viewer_frame").Viewer.SaveState true,false
|
|
End Sub
|
|
-->
|
|
</SCRIPT>
|
|
</HEAD>
|
|
|
|
<FRAMESET FRAMEBORDER="1" FRAMESPACING="3" ROWS="26,*">
|
|
<FRAME MARGINWIDTH="0" MARGINHEIGHT="0" SRC="StudioBanner.htm" NAME="StudioBannerFrame" NORESIZE SCROLLING="no">
|
|
<FRAMESET FRAMEBORDER="1" FRAMESPACING="3" COLS="40%,*">
|
|
<FRAME name="ClassnavFrame" MARGINWIDTH="0" MARGINHEIGHT="0" SRC="classnav.htm" SCROLLING="no">
|
|
<FRAME name="viewer_frame" MARGINWIDTH="0" MARGINHEIGHT="0" SRC="editor.htm" SCROLLING="no">
|
|
</FRAMESET>
|
|
</FRAMESET>
|
|
|
|
</html>
|
|
|