dickep Posted March 31, 2011 Share Posted March 31, 2011 OK, I know that this has been asked and answered here, but just can't seem to find it. What I need to understand better is what the ObjGet returns and how to use it. Code below was taken from here, but would like to know what all can be gleened from it. I see the Caption and DeviceId stuff, but what else is available? If I were to use this with another ObjGet call to another area, how would I know what I can see/get? Or is it the query/WMIService area that needs to be asked about? See my somewhat naive and noob confusion? Thanks #include <File.au3> $strComputer = "." $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_PnPEntity where DeviceID like 'USB\\%'") If IsObj($colItems) then $thisFile = FileOpen("usbstuff.txt", 2) For $objItem In $colItems FileWrite($thisFile, "--------------------------------------" & @CRLF) FileWrite($thisFile, "Caption: " & $objItem.Caption & @CRLF) FileWrite($thisFile, "DeviceId: " & $objItem.DeviceID & @CRLF) Next FileWrite($thisFile, "--------------------------------------" & @CRLF) FileClose($thisFile) Endif Link to comment Share on other sites More sharing options...
smartee Posted March 31, 2011 Share Posted March 31, 2011 It is the WMI stuff I guess you need to play around with, and i know of to help you with that 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