usera Posted November 1, 2013 Share Posted November 1, 2013 Greeting, I had a link here http://msdn.microsoft.com/en-us/library/aa376484%28v=vs.85%29.aspx class Win32_Tpm { boolean IsActivated_InitialValue; boolean IsEnabled_InitialValue; boolean IsOwned_InitialValue; string SpecVersion; string ManufacturerVersion; string ManufacturerVersionInfo; uint32 ManufacturerId; string PhysicalPresenceVersionInfo; }; about the win32_Tpm. Can someone help me how to coding it us autoit? really want to learn it Thank usera Link to comment Share on other sites More sharing options...
trancexx Posted November 2, 2013 Share Posted November 2, 2013 Learn what exactly? No error checking here: #RequireAdmin $oMTpm = ObjGet("winmgmts:\\.\root\cimv2\Security\MicrosoftTpm") $oCol = $oMTpm.InstancesOf("Win32_Tpm") For $oObj In $oCol ConsoleWrite($oObj.IsActivated_InitialValue & @CRLF) ConsoleWrite($oObj.IsEnabled_InitialValue & @CRLF) ConsoleWrite($oObj.IsOwned_InitialValue & @CRLF) ConsoleWrite($oObj.SpecVersion & @CRLF) ConsoleWrite($oObj.ManufacturerVersion & @CRLF) ConsoleWrite($oObj.ManufacturerVersionInfo & @CRLF) ConsoleWrite($oObj.ManufacturerId & @CRLF) ConsoleWrite($oObj.PhysicalPresenceVersionInfo & @CRLF) Next ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
usera Posted November 3, 2013 Author Share Posted November 3, 2013 Learn what exactly? No error checking here: #RequireAdmin $oMTpm = ObjGet("winmgmts:\\.\root\cimv2\Security\MicrosoftTpm") $oCol = $oMTpm.InstancesOf("Win32_Tpm") For $oObj In $oCol ConsoleWrite($oObj.IsActivated_InitialValue & @CRLF) ConsoleWrite($oObj.IsEnabled_InitialValue & @CRLF) ConsoleWrite($oObj.IsOwned_InitialValue & @CRLF) ConsoleWrite($oObj.SpecVersion & @CRLF) ConsoleWrite($oObj.ManufacturerVersion & @CRLF) ConsoleWrite($oObj.ManufacturerVersionInfo & @CRLF) ConsoleWrite($oObj.ManufacturerId & @CRLF) ConsoleWrite($oObj.PhysicalPresenceVersionInfo & @CRLF) Next thanks for help. but I can not get any result from that code Thanks Link to comment Share on other sites More sharing options...
water Posted November 3, 2013 Share Posted November 3, 2013 In this case you need to add some error checking. Add a COM error handler if you run AutoIt 3.3.8.1. Check function ObjEvent for an example. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
UEZ Posted November 3, 2013 Share Posted November 3, 2013 (edited) Search for "AutoIt Scriptomatic Tool" to check whether rootcimv2SecurityMicrosoftTpm WMI class is installed on your system. Might be that TPM is turned off in the BIOS. Br, UEZ Edited November 3, 2013 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
usera Posted November 5, 2013 Author Share Posted November 5, 2013 Learn what exactly? No error checking here: #RequireAdmin $oMTpm = ObjGet("winmgmts:\\.\root\cimv2\Security\MicrosoftTpm") $oCol = $oMTpm.InstancesOf("Win32_Tpm") For $oObj In $oCol ConsoleWrite($oObj.IsActivated_InitialValue & @CRLF) ConsoleWrite($oObj.IsEnabled_InitialValue & @CRLF) ConsoleWrite($oObj.IsOwned_InitialValue & @CRLF) ConsoleWrite($oObj.SpecVersion & @CRLF) ConsoleWrite($oObj.ManufacturerVersion & @CRLF) ConsoleWrite($oObj.ManufacturerVersionInfo & @CRLF) ConsoleWrite($oObj.ManufacturerId & @CRLF) ConsoleWrite($oObj.PhysicalPresenceVersionInfo & @CRLF) Next thanks, this is the way to call windows class? thanks Link to comment Share on other sites More sharing options...
trancexx Posted November 5, 2013 Share Posted November 5, 2013 WMI class yes. Win32_Tpm class is WMI class. Instead of InstancesOf() you can call ExecQuery() in case you want to filter the output. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now