![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | webpage scan client programs We're trying implement a script on our web site that retreives the Java Runtime version and redirects the user based on the version number. I've made a script that works as a vbs. However, when I try to implement it as a webpage, the script stops without showing any error. I realize that there might be a security issue here, but would think that the visitor could click through the yellow bar. Is there anything I can do to get the html page to work? vbs script strProd = "Java(TM) 6" strQry = "SELECT Version FROM Win32_Product WHERE Name LIKE '%" & strProd & "%'" Set objWMIService = GetObject( "winmgmts://./root/CIMV2" ) 'Set colItems = objWMIService.ExecQuery( strQry, "WQL", 48 ) Set colItems = objWMIService.ExecQuery( strQry) For Each objItem In colItems txt = txt & "Name: " & objitem.name & vbcrlf & "Version: " & objItem.Version &_ vbcrlf & vbcrlf Next msgbox txt .. .. .. html page <script language="vbscript"> strProd = "Java(TM) 6" strQry = "SELECT Version FROM Win32_Product WHERE Name LIKE '%" & strProd & "%'" document.write("start <br>") Set objWMIService = GetObject( "winmgmts://./root/CIMV2" ) 'Set colItems = objWMIService.ExecQuery( strQry, "WQL", 48 ) Set colItems = objWMIService.ExecQuery( strQry) 'for each objitem in GetObject( "winmgmts://localhost").Instancesof ("Win32_Product") For Each objItem In colItems txt = txt & "Name: " & objitem.name & vbcrlf & "Version: " & objItem.Version &_ vbcrlf & vbcrlf Next document.write(txt) document.write("end") 'msgbox txt </script> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Webpage Shortcuts & Custom Icons for "All Programs" in Vista | Vista General | |||
| Lost Good Lexmark Scan software to Inferior Vista Scan | Vista print fax & scan | |||
| Webpage email link won't open -- error message -- default email client not installed | Vista mail | |||
| Canon FB620U - Office 2007 Scan OK - Vista F & Scan NO ? | Vista print fax & scan | |||
| using windows fax and scan client and Windows fax server | Vista print fax & scan | |||