mchristo63
asked on
I need a script
Not being that familar with scripts, I look to the experts for advice. I need a script that will report a file version on a number of servers. I have the following script that works well, but I have to OK through each server. I would like to to output the results in a list or some kind of file.
WScript.Echo "Server name" & vbTab & "File Version"
'WScript.Echo "-----------" & vbTab & "-----------------"
Const ForReading = 1
Set objDictionary = CreateObject("Scripting.Di ctionary")
Set objFSO = CreateObject("Scripting.Fi leSystemOb ject")
Set objTextFile = objFSO.OpenTextFile("C:\se rvers.txt" , ForReading)
i = 0
Do Until objTextFile.AtEndOfStream
strNextLine = objTextFile.Readline
objDictionary.Add i, strNextLine
i = i + 1
Loop
For Each objItem in objDictionary
Set objFSO = CreateObject("Scripting.Fi leSystemOb ject")
Wscript.Echo objDictionary.Item(objItem ) & vbTab & objFSO.GetFileVersion _
("\\"& objDictionary.Item(objItem ) & "\C$\Program Files\application\file.exe ")
Next
Thanks
WScript.Echo "Server name" & vbTab & "File Version"
'WScript.Echo "-----------" & vbTab & "-----------------"
Const ForReading = 1
Set objDictionary = CreateObject("Scripting.Di
Set objFSO = CreateObject("Scripting.Fi
Set objTextFile = objFSO.OpenTextFile("C:\se
i = 0
Do Until objTextFile.AtEndOfStream
strNextLine = objTextFile.Readline
objDictionary.Add i, strNextLine
i = i + 1
Loop
For Each objItem in objDictionary
Set objFSO = CreateObject("Scripting.Fi
Wscript.Echo objDictionary.Item(objItem
("\\"& objDictionary.Item(objItem
Next
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellent!
Thank you!
Hope this helps
J