Re: Is there a way to output this information and create an html form
- From: "McKirahan" <News@xxxxxxxxxxxxx>
- Date: Sun, 22 May 2005 09:14:00 -0500
"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
.
- References:
- Prev by Date: Re: read the values of an object in LDAP
- Next by Date: Re: WSH and WinPE problems
- Previous by thread: Is there a way to output this information and create an html form
- Next by thread: read the values of an object in LDAP
- Index(es):
Relevant Pages
|