[python-win32] accessing Win32_Tpm()

prashant padaganur prashantpadaganur at gmail.com
Wed Jun 20 07:14:02 CEST 2012


Hi,

I am new to WMI.

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)


-- 
Cheers,
Prashant G.P
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20120620/9246bb3b/attachment.html>


More information about the python-win32 mailing list