vbs to determine Software Versions

Hi I have a VB script to determine the versions of both Windows Media Player and Internet Explorer. What I would like to do at the end of the script is to export the data along with the PC name to a folder on the server (so I can get 100 or so users to run then I can check and update if required.
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & _
    "\root\cimv2\Applications\MicrosoftIE")

Set colIESettings = objWMIService.ExecQuery _
    ("Select * from MicrosoftIE_Summary")

For Each strIESetting in colIESettings
    Wscript.Echo "Version: " & strIESetting.Version
next
Dim o
Set o = CreateObject("WMPlayer.OCX")
MsgBox o.VersionInfo
kwatt562Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jorge PaulinoIT Pro/DeveloperCommented:
You can try something like this (not tested)
Dim message, myFSO, WriteStuff

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & _
    "\root\cimv2\Applications\MicrosoftIE")

Set colIESettings = objWMIService.ExecQuery _
    ("Select * from MicrosoftIE_Summary")

For Each strIESetting in colIESettings
    Wscript.Echo "Version: " & strIESetting.Version
next
Dim o 
Set o = CreateObject("WMPlayer.OCX")

message = o.VersionInfo

Set myFSO = CreateObject("Scripting.FileSystemObject")
Set WriteStuff = myFSO.OpenTextFile("c:\yourtextfile.txt", 8, True)
WriteStuff.WriteLine(message)
WriteStuff.Close
Set WriteStuff = Nothing
Set myFSO = Nothing

Open in new window

0
RobSampsonCommented:
Try this as well, which will write to separate files for each computer.

Regards,

Rob.
Set objNetwork = CreateObject("WScript.Network")
Set objFSO = CreateObject("Scripting.FileSystemObject")

strComputer = "."
If strComputer = "." Then
	strOutput = "\\server\share\" & objNetwork.ComputerName & "_versions.txt"
Else
	strOutput = "\\server\share\" & strComputer & "_versions.txt"
End If
	
Set objWMIService = GetObject("winmgmts:\\" & strComputer & _
    "\root\cimv2\Applications\MicrosoftIE")

Set colIESettings = objWMIService.ExecQuery _
    ("Select * from MicrosoftIE_Summary")

For Each strIESetting in colIESettings
	strMessage = "IE Version:"  & strIESetting.Version
Next
Dim o
Set o = CreateObject("WMPlayer.OCX")
strMessage = strMessage & "," & "WMP Version: " & o.VersionInfo

Set objOutput = objFSO.CreateTextFile(strOutput, True)
objOutput.WriteLine strMessage
objOutput.Close

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kwatt562Author Commented:
Genius, thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.