destro Posted November 19, 2009 Posted November 19, 2009 Hi, I have looked through the forum and not come across a solution to this particular issue that I am having. I am trying to get all of the information possible from certain areas of the WMI. My idea was to have some code like this: $objWMI = ObjGet("winmgmts:\\localhost\root\CIMV2") $objItems = $objWMI.ExecQuery("SELECT * FROM Win32_ComputerSystem", "WQL", 0x10 + 0x20) If IsObj($objItems) Then For $objItem In $objItems ConsoleWrite("Manufacturer: " & $objItem.Manufacturer & @CRLF) ConsoleWrite("Model: " & $objItem.Model & @CRLF) ConsoleWrite("Name: " & $objItem.Caption & @CRLF) ConsoleWrite("Description: " & $objItem.Description & @CRLF) Next EndIf The problem I have is that I don't want to have to know the name of every value that I want to query. I just want to get ALL the values that are in the class. For example, in the above Ihave used $objItem.Manufacturer, $objItem.Model, $objItem.Caption and $objItem.Description. The problem is that I don't always know what is in there so I just want to dump ALL of the values without having to look up each one individually. Is this possible?
PsaltyDS Posted November 19, 2009 Posted November 19, 2009 Can you say "AutoIt Script-o-matic"? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
destro Posted November 19, 2009 Author Posted November 19, 2009 Can you say "AutoIt Script-o-matic"? Hah, that's awesome! Why try to reinvent the wheel. Gives me exactly what I need
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