[web] Visual Basic & HTML

This topic is 5109 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

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

Share on other sites
Before I answer, is this VBScript embedded in a webpage or is it a standalone VB App?

Share on other sites
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

Share on other sites
If you put
<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.

Moved to WebDev.

Share on other sites
Could you give me an example please?

Thanks

David

Share on other sites
Replace your Wscript.Echo's with response.write's and build a table around it, then embed it in your webpage.

Share on other sites
Still not getting it, please clould you give me an example?

Thanks

David

Share on other sites
An example within HTML would be useful as I have tried the above but I either got a blank page or an error

Thanks

Share on other sites
Is this server-side scripting or client side?

1. 1
2. 2
3. 3
Rutin
18
4. 4
JoeJ
14
5. 5

• 14
• 10
• 23
• 9
• 48
• Forum Statistics

• Total Topics
632637
• Total Posts
3007578
• Who's Online (See full list)

There are no registered users currently online

×