usera Posted November 1, 2013 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
trancexx Posted November 2, 2013 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
usera Posted November 3, 2013 Author 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
water Posted November 3, 2013 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
UEZ Posted November 3, 2013 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
usera Posted November 5, 2013 Author 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
trancexx Posted November 5, 2013 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
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