Command-Line Options with USBDeview

USBDeview is a small utility that lists all USB devices that currently connected to your computer, as well as all USB devices that you previously used.To know more about this freeware please refer to this post earlier published.

usbdeview

 

Execute a command when you insert a USB device:

Starting from version 1.10, USBDeview allows you to execute a command from exe/cmd/bat file in every time that insert a USB device to your system. In order to use this feature, go to ‘Options->Advanced Options’, select the ‘Execute..’ check-box, and type the exe/cmd file that you want to run. You can also use the following special variables in this command
string: %device_name%, %device_desc%, %drive%, %serial_number%, %vid%,
%pid%, %vid_hex%, %pid_hex%
USBDeview will automatically replace these variables with the appropriate data of the device that you inserted. For example, if you want to pass to your exe file 2 parameters – the serial number of the device, and the drive letter:
c:temptest.exe "%serial_number%" "%drive%"

Stop/Disconnect Command-Line Options:

* /stop {/showmsg} {\RemoteComputer} <Device Name>
  Stop/disconnect a USB device by specifying its name or description. You don’t have to specify the whole name or description. You can also specify only a part of the name or description string, and USBDeview will identify it. For example, If the device name is ‘Kingston DataTraveler 2.0’, you can simply put ‘kingston’ or ‘DataTraveler’ in the device name parameter, and USBDeview will disconnect the right device. If you want that a message/balloon will be displayed after the device is disconnected, add the ‘/showmsg’ parameter. (Windows 2000 displays a message-box, Windows XP displays a balloon) If you want to disconnect a device in a remote computer, specify the remote computer name, with \ prefix. You must login to the remote computer with admin rights in order to do that.
  Examples:
  USBDeview.exe /stop /showmsg "DVD RW"
  USBDeview.exe /stop "DataTraveler"
  USBDeview.exe /stop \comp01 "SanDisk Cruzer"

* /stop_by_serial {/showmsg} {\RemoteComputer} <Device Name>
  Similar to /stop command, but instead of specifying a device name, you should specify the serial number of the device Works only with mass storage devices.
  Examples:
  USBDeview.exe /stop_by_serial ea051261
  USBDeview.exe /stop_by_serial /showmsg 876534513

* /stop_by_drive {/showmsg} {\RemoteComputer} <Device Name>
  Stop/disconnect a USB device by specifying its drive letter. Works only with USB flash drives and CD/DVD devices.
  Examples:
  USBDeview.exe /stop_by_drive g:
  USBDeview.exe /stop_by_drive /showmsg f:
  USBDeview.exe /stop_by_drive /showmsg \comp02 t:

* /stop_by_class {/showmsg} {\RemoteComputer} <USB Class;USB
  SubClass;USB Protocol>
  Stop/disconnect a USB device by specifying the class/subclass/protocol  combination. For example, if you want to stop all ‘Mass Storage’ devices, you should specify the following class/subclass/protocol combination: 08;06;50
  Examples:
  USBDeview.exe /stop_by_class /showmsg 08;06;50
  USBDeview.exe /stop_by_class 03;01;02

* /stop_by_pid {/showmsg} {\RemoteComputer} <VendorID;ProductID>
  Stop/disconnect a USB device by specifying the VendorID/ProductID. You can specify only the VendorID if you want to disconnect all devices with that VendorID.
  Examples:
  USBDeview.exe /stop_by_pid /showmsg 13fe;1a00
  USBDeview.exe /stop_by_pid 04f9

* /stop_all {/showmsg} {\RemoteComputer}
  Stop/disconnect all USB devices currently connected to your computer.

Disable/Enable/Remove Command-Line Options:

Starting from version 1.20, you can also use the following commands to disable, enable or remove USB devices from command-line:
* /disable {\RemoteComputer} <Device Name>
* /disable_by_serial {\RemoteComputer} <Device Name>
* /disable_by_drive {\RemoteComputer} <Device Name>
* /disable_by_class {\RemoteComputer} <USB Class;USB SubClass;USB
  Protocol>
* /disable_by_pid {\RemoteComputer} <VendorID;ProductID>
* /disable_all {\RemoteComputer}
* /enable {\RemoteComputer} <Device Name>
* /enable_by_serial {\RemoteComputer} <Device Name>
* /enable_by_drive {\RemoteComputer} <Device Name>
* /enable_by_class {\RemoteComputer} <USB Class;USB SubClass;USB
  Protocol>
* /enable_by_pid {\RemoteComputer} <VendorID;ProductID>
* /enable_all {\RemoteComputer}
* /remove {\RemoteComputer} <Device Name>
* /remove_by_serial {\RemoteComputer} <Device Name>
* /remove_by_drive {\RemoteComputer} <Device Name>
* /remove_by_class {\RemoteComputer} <USB Class;USB SubClass;USB
  Protocol>
* /remove_by_pid {\RemoteComputer} <VendorID;ProductID>
* /remove_all {\RemoteComputer}
* /remove_all_connected – Remove all connected USB devices.
* /remove_all_disconnected – Remove all disconnected USB devices.

Save Command-Line Options:

/stext <Filename>
Save the list of all USB devices into a regular text file.

/stab <Filename>
Save the list of all USB devices into a tab-delimited text file.

/scomma <Filename>
Save the list of all USB devices into a comma-delimited text file.

/stabular <Filename>
Save the list of all USB devices into a tabular text file.

/shtml <Filename>
Save the list of all USB devices into HTML file (Horizontal).

/sverhtml <Filename>
Save the list of all USB devices into HTML file (Vertical).

/sxml <Filename>
Save the list of all USB devices to XML file.

/sort <column>
This command-line option can be used with other save options for sorting by the desired column. If you don’t specify this option, the list is sorted according to the last sort that you made from the user interface. The <column> parameter can specify the column index (0 for the first column, 1 for the second column, and so on) or the name of the column, like "Device Name" and "Description". You can specify the ‘~’ prefix character (e.g: "~Description") if you want to sort in descending order. You can put multiple /sort in the command-line if you want to sort by
multiple columns.

Examples:
USBDeview.exe /shtml "f:tempusb-list.html" /sort 2 /sort ~1
USBDeview.exe /shtml "f:tempusb-list.html" /sort "Device Type" /sort
"Device Name"

/nosort
When you specify this command-line option, the list will be saved without
any sorting.

Download:

Download USBDeview from here .

del.icio.us Tags: ,,,
Technorati Tags: ,,,

Leave a Reply

Your email address will not be published. Required fields are marked *