I am needing to pull information about File/Program versions from a computer opening a intranet webpage. Of course, Internet Exploder won't allow VBScript to run WMI queries.
Basically I am needing to get something like :
To actually work instead of returning :
I've thought of JavaScript, but it won't read files and grab the info I need (I don't think, not good at JavaScript).
How do I get the info I need without lowering the IE security settings?? How do I get it to display in the HTML page the user will get to?
Basically I am needing to get something like :
Code:
<html>
<head>
<SCRIPT language="vbscript" type="text/vbscript" >
Sub window_onLoad
Dim strComputer, objDocument, objWMIService, objFile, ColFiles, strQuery, sFile, sVer
'OPEN CURRENT DOCUMENT
Set objDocument = self.Document
objDocument.open
on error resume next
'SET TITLE AND HEADING
strComputer = "."
objdocument.WriteLn "<title>My TITLE here</title>"
objdocument.WriteLn "<h2>Header for page</h2><hr>"
objdocument.WriteLn "<br>Please wait while we acquire your current configuration...<br>"
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\cimv2")
objDocument.WriteLn "<br>Set Service: " & err.number & " " & err.description
strQuery = "Select * FROM CIM_Datafile WHERE Drive = 'C:' AND FileName = 'acrord32' AND Extension = 'exe'"
objDocument.WriteLn "<br>Query: " & err.number & " " & err.description
objdocument.WriteLn "<p>Your current setup is:</p>"
set ColFiles = objWMIService.ExecQuery(strQuery)
For Each objFile In ColFiles
sFile = objFile.Name
sVer = objFile.Version
objdocument.WriteLn "<p>" & sFile & " is at version " & sVer
Next
End sub
<create links to install software here>
</Script>
</head>
<body>
</body>
</html>
To actually work instead of returning :
Code:
Please wait while we acquire your current configuration...
Set Service: 429 ActiveX component can't create object
Query: 429 ActiveX component can't create object
Your current setup is:
is at version
I've thought of JavaScript, but it won't read files and grab the info I need (I don't think, not good at JavaScript).
How do I get the info I need without lowering the IE security settings?? How do I get it to display in the HTML page the user will get to?