Jim P.
asked on
Script to find other file attributes
I have the following script which I use to find the version of all the dll's and exe's in a directory. I use the re-direct ">" to write it to a text file.
I now have an app that is cross-linking between two vendors and "blowing" it up. What I'd like to do is get not only the version, but the other attributes like Company, internal name and some of the other attributes you see when you right click an exe and look at the version tab.
I want to pull down the list and then from there do an install of the offending app and see what I get afterward.
I now have an app that is cross-linking between two vendors and "blowing" it up. What I'd like to do is get not only the version, but the other attributes like Company, internal name and some of the other attributes you see when you right click an exe and look at the version tab.
I want to pull down the list and then from there do an install of the offending app and see what I get afterward.
strComputer = "CompName"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFileList = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='C:\MyPath\'} Where " _
& "ResultClass = CIM_DataFile")
For Each objFile In colFileList
If objFile.Extension = "dll" or objFile.Extension = "exe" Then
Wscript.Echo objFile.Name & " -- " & objFile.Version
End If
Next
File-Attr.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.