[web] Visual Basic & HTML
Hi all,
I have written a VB script to detect a users bios settings and want the information to be displayed in tables using html when they open the page. The code is:
-----------------------------------------------------------------
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
For Each objItem in colItems
Wscript.Echo "BuildNumber: " & objItem.BuildNumber
Wscript.Echo "Caption: " & objItem.Caption
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "Manufacturer: " & objItem.Manufacturer
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "ReleaseDate: " & objItem.ReleaseDate
Wscript.Echo "SMBIOSBIOSVersion: " & objItem.SMBIOSBIOSVersion
Wscript.Echo "SMBIOSMajorVersion: " & objItem.SMBIOSMajorVersion
Wscript.Echo "SMBIOSMinorVersion: " & objItem.SMBIOSMinorVersion
Wscript.Echo "SoftwareElementID: " & objItem.SoftwareElementID
Wscript.Echo "TargetOperatingSystem: " & objItem.TargetOperatingSystem
Wscript.Echo "Version: " & objItem.Version
Next
-----------------------------------------------------------------
At the moment this displays the information in a pop-up box and obviously doesnt use html. All I really need to know what to do is put this in with the html code and display it on the webpage instead of using the dialogue box.
If someone could help I would really appreciate it.
Thanks
David
This is stand alone at the moment yes, but I want it embedded in the webpage or for the page to access the script to retrieve the info
David
David
If you put
anywhere in your HTML page, wherever you put it, the text "something" will appear. You can use this to print out the variables.
<script language="VBScript">response.write "something"</script>
anywhere in your HTML page, wherever you put it, the text "something" will appear. You can use this to print out the variables.
Replace your Wscript.Echo's with response.write's and build a table around it, then embed it in your webpage.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement