View Full Version : Output vbscript and WMI in HTML

Amanda Wansley
04-19-2004, 04:40 PM

I am an intern with the task of writting an interface for a hardware database.
I have to take some code my supervisor wrote and try to output it in HTML, but in a way that it can be edited after it is output. Here is the code. My problem is getting the html to recognize the vbscript procedure. Is it a good idea to make it a procedure? :eek: :confused: Does any have any suggestions? I need help bad.


<script language="vbscript">

Sub_cmdButton onClick()

Dim Name As String
Dim Model As String

Model = strmsg & "Model: " & objItem.Model CRLF
Name = strmsg & "Name: " & objItem.Name

'strComputer = "."
strComputer = InputBox("Please enter the name of the computer[insert a period '.']
for the current machine")
If strComputer = "" Then
wscript (0)
End If

Set objWMIService = GetObject("winmgmts:"_
&"{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery('Select * from

For Each ObjItem in colItems
Memformat = Cint(objItem.TotalPhysicalMemory/1000000)


<BODY onload = "cmdButton()">

<script langauge = "javascript">




04-22-2004, 06:31 AM
I responded to your duplicate post here: