Chimaera Posted May 11, 2012 Share Posted May 11, 2012 I was using this for hard drives to get some info Consolewrite(_HardDrives()) Func _HardDrives() Local $sResult, $objWMIService, $colItems Local $strcomputer = "." $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $strcomputer & "\root\cimv2") $colItems = $objWMIService.ExecQuery("Select * from Win32_DiskDrive") For $objItem In $colItems $sResult &= $objItem.Caption & @TAB & "Size: " & Int($objItem.Size / 1024 ^ 3) & " GB" & @LF Next Return $sResult EndFunc ;==>_HardDrives And i noticed that on one machine that had a card reader slot it returned this Generic-Multi-Card uSB Device Size: 0GB Is there a way to make it only return that device or maybe only return the 0 GB devices which should be the card reader? If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Zedna Posted May 18, 2012 Share Posted May 18, 2012 (edited) WMI Classeshttp://msdn.microsoft.com/en-us/library/windows/desktop/aa394554%28v=vs.85%29.aspxWin32 Classeshttp://msdn.microsoft.com/en-us/library/windows/desktop/aa394084%28v=vs.85%29.aspxWin32_DiskDrivehttp://msdn.microsoft.com/en-us/library/windows/desktop/aa394132%28v=vs.85%29.aspx Edited May 18, 2012 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Chimaera Posted June 27, 2012 Author Share Posted June 27, 2012 thanks for that think ive resolved by using Int($objItem.Capabilities(0) Will test and report back If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() 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