browse file system of android device in MTP mode via powershell using a wmiobject -
I have gone through some posts and articles that how to use the powers on a USB drive:
But none of them is actually a "answer" question in the last post also said It has been said that no MTP solution has ever been created due to some limitations of any MTP (protocol).
I have hit a wall in a way; I do not know what to do next (with the wmi object) I have used the following VBSSP program, and I am interested in keeping the device's device id in mind:
strComputer = "." Set objWMIService = GetObject ( "winmgmts: \\" & amp; strComputer & amp; "\ root \ cimv2") set colDevices = objWMIService.ExecQuery _ ( "Select from Win32_USBControllerDevice *") strDeviceName = objDevice for each objDevice in colDevices .Dependent strQuotes = Chr (34) strDeviceName = Change (strDeviceName, strQuotes, select the "") arrDeviceNames = Split (strDeviceName, "=") strDeviceName = arrDeviceNames (1) set colUSBDevices = objWMIService.ExecQuery _ ( "* from Win32_PnPEntity Where DeviceID = '& amp; strDeviceName & amp; "'") for each objUSBDevice colusbDevices Wscript.Echo objUSBDevice.Description Next Next I have removed the flaws in a way To get that WMI object In the PowerShell command given below:
Get-WmiObject win32_pnpentity -filter "DeviceID = '& lt; the_device_id & gt;'" Looks like I have a WMI object but what can I do with it.
I have a hip with everything I have done from the previous post, there is a comedic way to deal with this. How do we do this?
Use this command to find the MTP devices in Power Shell:
go-WMIObject -class win32_pnpentity-computername localhost | Where {$ _. HardwareID-like "* MTP *"} | Format list Example output for Samsung Galaxy S5
__General: 2__class: Win32_PnPEntity < / Code>__ Supercars: CIM_LogicalDevice__Dyasti: CIM_ManagedSystemElement__RELPATH: Win32_PnPEntity.DeviceID = "USB \\ VID_04E8 and PID_6860 and MS_COMP_MTP and SAMSUNG_ANDROID \\ 6 and 8F62A49 and amp; amp; 0 and 0000 "__ PROPERTY_COUNT: 24__ derivation: {CIM_LogicalDevice, CIM_LogicalElement, CIM_ManagedSystemElement}__ server: - * - Computer name - * -__ NAMESPACE: root \ cimv2__ path: \\ - * - computer name - * - \ root \ cimv2: win32_PnPEnti Ty.DeviceID = "USB \\ VID_04E8 & amp; PID_6860 & MS_COMP_MTP & SAMSUNG_ANDROID \\ 6 & 8F62A49 & amp; 0 & amp;; 00"Availability:Caption: - * - device display name in Explorer - * -Clasguid: {eec5ad98-8080-425f-922a-dabf3de3f69a}CompatibleID: {USB \ MS_COMP_MTP , USB \ Class_06 & amp; SubClass_01 & amp; Prot_01, USB \ Class_06 & amp; SubClass_01, USB \ Class_06 ...}ConfigManagerErrorCode: 0ConfigManagerUserConfig: falseCreationClassName: Win32_PnPEntityDescription: SM- G900PDeviceID: USB \ VID_04E8 & amp; PID_6860 & amp; MS_COMP_MTP & amp; SAMSUNG_ANDROID \ 6 & amp; 8F62A49 & amp; 0 & amp; 0000ErrorCleared:Trutivivrn:Hardveyraidi: {USB \ VID_04E8 and PID_6860 and REV_0400 and MS_COMP_MTP and SAMSUNG_Android, USB \ VID_04E8 & amp; PID_6860 & amp; Ms._ COMP_MTP & amp; SAMSUNG_Android, USB \ SAMSUNG_MOBILE & amp; MS_COMP_MTP & amp; SAMSUNG_Android, USB \ SAMSUNG_MOBILE and MI_00 ...}installed date:LastErrorCode:manufacturer: Samsung Electronics Co., Ltd.Name: - * - Device display name in Explorer - * -PNPDeviceID: USB \ VID_04E8 and PID_6860 and MS_COMP_MTP and SAMSUNG_ANDROID \ 6 and 8F62A49 & amp; Amp; 0 and amp;PowerManagementSupported: Code>SystemCreationClassName: Win32_ComputerSystemSystemName: - * - Computer Name - * -
Comments
Post a Comment