Friday 29 May 2009

Devcon - Controlling Devices from the command prompt.

Devcon - Controlling Devices from the command prompt.

1) Download Devcon from here > http://support.microsoft.com/?kbid=311272

2 ) Open an Administrator command prompt

3) Use Devcon!


To see the classes of devices installed >

D:\devcon\i386>devcon classes

Listing 58 setup class(es).
WCEUSBS : Mobile devices
USB : Universal Serial Bus controllers
Media Center Extender: Media Center Extender
PnpPrinters : IEEE 1394 and SCSI printers
Dot4 : IEEE 1284.4 devices
Dot4Print : IEEE 1284.4 compatible printer
CDROM : DVD/CD-ROM drives
Computer : Computer
DiskDrive : Disk drives
Display : Display adapters
fdc : Floppy drive controllers
hdc : IDE ATA/ATAPI controllers
Keyboard : Keyboards
MEDIA : Sound, video and game controllers
Modem : Modems
Monitor : Monitors
Mouse : Mice and other pointing devices
MTD : Memory technology driver
MultiFunction : Multifunction adapters
Net : Network adapters
NetClient : Network Client
NetService : Network Service
NetTrans : Network Protocol
PCMCIA : PCMCIA adapters
Ports : Ports (COM & LPT)
Printer : Printers
SCSIAdapter : Storage controllers
System : System devices
Unknown : Other devices
FloppyDisk : Floppy disk drives
Processor : Processors
MultiPortSerial : Multi-port serial adapters
Memory : Memory devices
SmartCardReader : Smart card readers
Sensor : Sensors
VolumeSnapshot : Storage volume shadow copies
BiometricDevice : Biometric Devices
1394 : IEEE 1394 Bus host controllers
Infrared : Infrared devices
Image : Imaging devices
TapeDrive : Tape drives
Volume : Storage Volumes
Battery : Batteries
HIDClass : Human Interface Devices
61883 : 61883 Device Class
LegacyDriver : Non-Plug and Play Drivers
SmartCard : Smart cards
SideShow : Windows SideShow
SDHost : SD host adapters
Transfer Cable : Transfer Cable Devices
AVC : AVC Devices
MediumChanger : Medium Changer devices
SBP2 : SBP2 IEEE 1394 Devices
XnaComposite : Microsoft Common Controller For Windows Class
SecurityDevices : Security Devices
SmartCardFilter : Smart Card Filter
Bluetooth : Bluetooth Radios
WPD : Portable Devices

The class for Portable Devices is 'WPD'

List all Portable devices currently plugged in >

D:\devcon\i386>devcon listclass wpd

Listing 1 device(s) for setup class "WPD" (Portable Devices).
WPDBUSENUMROOT\UMB\2&37C186B&0&STORAGE#VOLUME#_??_USBSTOR#DISK&VEN_CORSAIR&PROD_
UFD&REV_1100#AA23000000001534&0#: G:\

Yes, my current USB drive is made by Corsair!
If we'd already have known part of the name, we could have found like this >

D:\devcon\i386>devcon find *corsair*

USBSTOR\DISK&VEN_CORSAIR&PROD_UFD&REV_1100\AA23000000001534&0: Corsair UFD USB D
evice
1 matching device(s) found.

Finally, we can issue a command to safely remove the device >

D:\devcon\i386>devcon remove *corsair*

USBSTOR\DISK&VEN_CORSAIR&PROD_UFD&REV_1100\AA23000000001534&0: Removed
1 device(s) removed.

No comments: