Re: Is there a way to output this information and create an html form

Tech-Archive recommends: Fix windows errors by optimizing your registry



"Bob" <rmarsico@xxxxxxxxxxx> wrote in message
news:UWOje.837$4F1.482@xxxxxxxxxxx
> Is there a way to output this information and create an html form
> Please help greatly appreciated
>
>
> On Error Resume Next
>
> Const wbemFlagReturnImmediately = &h10
> Const wbemFlagForwardOnly = &h20
>
> arrComputers = Array(".")
> For Each strComputer In arrComputers
> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
> "\root\CIMV2")
> Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BIOS",
> "WQL", _
> wbemFlagReturnImmediately +
> wbemFlagForwardOnly)
>
> For Each objItem In colItems
> strBIOSVersion = Join(objItem.BIOSVersion, ",")
> WScript.Echo "BIOSVersion: " & strBIOSVersion
> WScript.Echo "SerialNumber: " & objItem.SerialNumber
> Next
> Next
>
>

Will this help? Watch for word-wrap.

It creates a table not a form on a Web page.
If you need "an html form", please describe it's format?

Option Explicit
'*
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
'*
Dim arrComputers
arrComputers = Array(".")
Dim strComputer
Dim objWMIService
Dim colItems
Dim objItem
Dim strHTML
strHTML = "<table border='0' width='300'>"
strHTML = strHTML & "<tr>"
strHTML = strHTML & " <th width='150'>BIOS Version<hr></th>"
strHTML = strHTML & " <th width='150'>Serial Number<hr></th>"
strHTML = strHTML & "</tr>"
strHTML = strHTML & "<?>"
strHTML = strHTML & "</table>"
Dim strITEM
'*
On Error Resume Next
For Each strComputer In arrComputers
Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BIOS",
"WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
strITEM = strITEM & "<tr>"
strITEM = strITEM & " <td>" & Join(objItem.BIOSVersion,",") &
"</td>"
strITEM = strITEM & " <td>" & objItem.SerialNumber & "</td>"
strITEM = strITEM & "<tr>"
Next
Next
strHTML = Replace(strHTML,"<?>",strITEM)
'*
Dim objIEA
Set objIEA = CreateObject("InternetExplorer.Application")
objIEA.ToolBar = 0
objIEA.StatusBar = 0
objIEA.Width = 350
objIEA.Height = 250
objIEA.Left = 0
objIEA.Top = 0
objIEA.Visible = True
objIEA.Navigate "about:blank"
While objIEA.Busy
Wend
objIEA.Document.Body.InnerHTML = strHTML



.



Relevant Pages

  • VB.NET 2003 WebRequest - Proxy Authentication Required
    ... I started using .NET 2003 and my first application is to parse an HTML form. ... But I am behind an ISA firewall and get "Proxy Authentication ... Dim webReq As WebRequest = WebRequest.Create ... Dim webResp As WebResponse = webReq.GetResponse ...
    (microsoft.public.vsnet.general)
  • WebRequest - Proxy Authentication Required
    ... I started using .NET 2003 and my first application is to parse an HTML form. ... But I am behind an ISA firewall and get "Proxy Authentication ... Dim webReq As WebRequest = WebRequest.Create ... Dim webResp As WebResponse = webReq.GetResponse ...
    (microsoft.public.dotnet.languages.vb)
  • Re: VBScript and Out Put to Excel Worksheet
    ... removed them from the list and now the script works. ... Dim strComputer, strDN ... On Error GoTo 0 ...
    (microsoft.public.windows.server.scripting)
  • Re: password change
    ... Dim objRootDSE, strDNSDomain, strQuery, adoRecordset, strComputer ... ' Open the log file for write access. ... is not reset to a separate text file of "missed" computers. ...
    (microsoft.public.windows.server.general)
  • Re: Need Help..
    ... strComputer, strName, strModel, etc. works, then I can only guess the ... this part of the script is working. ... The part where we must add disconnected computers to the database i can't ... Dim strComputerName ' The Computer Name to be queried via WMI ...
    (microsoft.public.windows.server.scripting)