Source Code for http://test.softwing.com/versionproperties.asp

COLOR LEGEND
Server Side Script
Client Side Script
Hyperlink
Include
Frames
Comments
Object Code Link
Standard HTML and Text


<%
Function GetProgIDInfo(strProgID)
     Dim xObj, bResult, strResult
   Dim aKeys, i, strOut
  
     Set xObj = Server.CreateObject("Softwing.VersionInfo")
    
     bResult = xObj.GetByProgId(strProgID)
     If 1 <> bResult Then
         strOut = "Could not load " & strProgID
   Else
     strOut = strOut & "ProgID: " & strProgID & vbCrLf
     If 1 <> xObj.IsMtxObject() Then
     aKeys = Array("CompanyName", "FileDescription", "FileVersion", "InternalName", "LegalCopyright", "OriginalFilename", "ProductName", "ProductVersion")
     For i = 0 To UBound(aKeys)
     strValue = strValue & aKeys(i) & ": " & xObj.GetValue(aKeys(i)) & vbCrLf
     Next
       strOut = strOut & strValue & vbCrLf
  
       strResult = "File Name: " & xObj.FileName & vbCrLf
     ' please see declares.vbs for the numeric values to which you could compare
     strResult = strResult & "Major Version: " & xObj.MajorVersion & vbCrLf
     strResult = strResult & "Minor Version: " & xObj.MinorVersion & vbCrLf
     strResult = strResult & "File Flags: " & xObj.FileFlags & vbCrLf
     strResult = strResult & "File OS: " & xObj.FileOS & vbCrLf
     strResult = strResult & "File Type: " & xObj.FileType & vbCrLf
     Else
       strResult = "This object is hosted in transaction server! No further information can be obtained."
     End If
   strOut = strOut & strResult
   End If
     Set xObj = Nothing
   GetProgIDInfo = strOut
End Function

Function GetFileInfo(strFileName)
     Dim xObj, bResult, strResult
   Dim aKeys, i, strOut
  
     Set xObj = Server.CreateObject("Softwing.VersionInfo")
    
     bResult = xObj.GetByFilename(strFileName)
     If 1 <> bResult Then
         strOut = "Could not load " & strFileName
   Else
     strOut = strOut & "File Name: " & strFileName & vbCrLf
   aKeys = Array("CompanyName", "FileDescription", "FileVersion", "InternalName", "LegalCopyright", "OriginalFilename", "ProductName", "ProductVersion")
   For i = 0 To UBound(aKeys)
   strValue = strValue & aKeys(i) & ": " & xObj.GetValue(aKeys(i)) & vbCrLf
   Next
     strOut = strOut & strValue & vbCrLf

     strResult = "File Name: " & xObj.FileName & vbCrLf
     ' please see declares.vbs for the numeric values to which you could compare
   strResult = strResult & "Major Version: " & xObj.MajorVersion & vbCrLf
   strResult = strResult & "Minor Version: " & xObj.MinorVersion & vbCrLf
   strResult = strResult & "File Flags: " & xObj.FileFlags & vbCrLf
   strResult = strResult & "File OS: " & xObj.FileOS & vbCrLf
   strResult = strResult & "File Type: " & xObj.FileType & vbCrLf
   strOut = strOut & strResult
   End If
     Set xObj = Nothing
   GetFileInfo = strOut
End Function

%>


<HTML>
<HEAD>
<TITLE>VersionInfo Component by Softwing</TITLE>
</HEAD>
<BODY BGCOLOR="White">
<%
strFileName = Trim(Request.Form("FileName"))
For intI = 1 to Request.Form("ProgID").Count
   strProgID = Trim(Request.Form("ProgID")(intI))
   If strProgID <> "" Then
     Response.Write "<B>You have queried for " & strProgID & "</B><BR>"
     Response.Write Replace(GetProgIDInfo(strProgID),vbCrLf,"<BR>" & vbCrLf)
     Response.Write "<BR>" & vbCrLf
   End If
Next

If strFileName <> "" Then
   Response.Write "<B>You have queried for " & strFileName & "</B><BR>"
   Response.Write Replace(GetFileInfo(strFileName),vbCrLf,"<BR>" & vbCrLf)
End If
%>

<BR>
<FORM ACTION="<%= Request.ServerVariables("SCRIPT_NAME") %>" METHOD="POST">
<TABLE CELLSPACING="2" CELLPADDING="2">
<TR>
     <TD>Prog ID: </TD>
     <TD><INPUT TYPE="Text" NAME="ProgID"></TD>
   <TD><SELECT NAME="ProgID">
    <OPTION Value ="">- Select -
    <OPTION>Softwing.VersionInfo
    <OPTION>MSWC.AdRotator
    <OPTION>MSWC.BrowserType
    <OPTION>MSWC.NextLink
    <OPTION>MSWC.Tools
    <OPTION>MSWC.Status
    <OPTION>MSWC.Counters
    <OPTION>IISSample.ContentRotator
    <OPTION>IISSample.PageCounter
    <OPTION>MSWC.ContentRotator
    <OPTION>MSWC.PermissionChecker
    <OPTION>ADODB.Connection
    <OPTION>ADODB.Recordset
   </SELECT></TD>
     <TD><INPUT TYPE="Submit" NAME="Submit" VALUE="Submit"></TD>
</TR>
<TR>
     <TD>File Name: </TD>
     <TD><INPUT TYPE="Text" NAME="FileName"></TD>
     <TD><INPUT TYPE="Submit" NAME="Submit" VALUE="Submit"></TD>
</TR>
</TABLE>

</FORM>

</BODY>
</HTML>