Jump to content

iphone connected to usb?


 Share

Go to solution Solved by JLogan3o13,

Recommended Posts

  • Moderators
  • Solution

I don't have my iPad plugged in, but this should capture devices plugged in via USB.

#include <MsgBoxConstants.au3>

$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20

$WMI = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2")
$aItems = $WMI.ExecQuery("SELECT * FROM Win32_PnPEntity", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

    If IsObj($aItems) Then
        For $item In $aItems
            MsgBox($MB_SYSTEMMODAL, $item.Description, $item.PNPDeviceID)
        Next
    Else
        Msgbox($MB_SYSTEMMODAL,"WMI Output","No WMI Objects Found for class: " & "Win32_PnPEntity" )
    Endif

You could easily modify it like so: 

#include <MsgBoxConstants.au3>

$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20

$WMI = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2")
$aItems = $WMI.ExecQuery("SELECT * FROM Win32_PnPEntity", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

    If IsObj($aItems) Then
        For $item In $aItems
            If StringInStr($item.Description, "iPad") Then
                ;Do Stuff
            EndIf
        Next
    Else
        Msgbox($MB_SYSTEMMODAL,"WMI Output","No WMI Objects Found for class: " & "Win32_PnPEntity" )
    Endif

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...