python - CIM_DATAFILE get file version

Status
Not open for further replies.

rcjay272

Seniorius Lurkius
1
All,

I am trying to use python to query a file to get the version. Below are examples of the code I am having issues with. I am at a loss and looking for help.

Any pointers would be great.


This code returns nothing.....

Code:
import wmi
getinstance = wmi.WMI()
for f in getinstance.CIM_DataFile (r'C:\\Windows\\system32\\notepad.exe'):
 print f.version

This code returns nothing.....
Code:
import wmi
getinstance = wmi.WMI()
for f in getinstance.CIM_DataFile (name="C:\\Windows\\system32\\notepad.exe"):
 print f.version

Thanks,
Rob
 
Status
Not open for further replies.