strComputer = "."
Set objWMIService = GetObject("winmgmts:\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService. _
ExecQuery("Select * From CIM_DataFile Where FileName = 'filename' and Extension = 'exe'")
For Each objFile in colFiles
Wscript.Echo objFile.Name, objFile.Version <--替換成文件輸出
Next