I have installed WMI for python and pywin32 extensions to be able to use win32 apis from my python scripts. While I can get all the info from other clasees like Win32_Battery, Win32_Processor I am having tough time with Win32_Tpm class.
I want to use Win32_Tpm module in python to play around with various tpm features, but all my references to win32_tpm are returning null.
Has anybody been able to use the same without any problems. Any help would be appreciated very much.
My code is simple:
import wmi,sys,os
c = wmi.WMI()
for tpm in c.Win32_Tpm():
pass
if tpm.IsActivated():
print 'Version %s' %(tpm.SpecVersion)
print 'Physical presence %s' %(tpm.PhysicalPresenceVersionInfo)
Thanks to Tim Golden. I found the answer.
Please refer to the thread
http://mail.python.org/pipermail/python-win32/2012-June/012381.html
If the above link is not accessible here is what we need to do, since Win32_Tpm() belongs to separate namespace we need to specify the full path of the namespace. Hope this helps.