Monthly Archives: March 2015

USB Drives – List Connect Share

In this post I want to share with you one of my HTA utilities created for viewing all USB sticks/devices that are currently plugged into a remote network computer, creating a share on remote computer and viewing the content of the shared USB stick on a remote computer. In addition, I wanted to use this HTA tool to view a user logged into a remote computer and, if required, disable or enable the usage of USB sticks in order to prevent users from connecting to USB storage devices on a remote computer.
The picture below shows the simple interface of this HTA tool named “USB Drive Info”.
UsbDriveInfo_App_01 Figure 1: USB Drive Info application

In order to see if there is any USB devices connected to a remote networked computer, I just need to type the name of a remote computer (in my example: TEST-AFL-XYZ007 or its IP address) and click the top button on the right “View USB Drives”. If the remote machine is online, and has USB sticks plugged in, the list of USB Flash Drives will display all connected devices showing their info such as Model, Size, Drive Letter and devices’ serial numbers. Please see the example in the picture below.


Figure 2: USB Drive Info displays the list of USB sticks plugged into the remote computer

To connect and share USB stick (model name Lexar JD FireFly) represented by G: letter drive, I only need to click on the button “Create Share/Connect” in the same row (row number 2) as this USB device, and if successful, the popup window will display message “TEST-AFL-XYZ007 created USB Share named G – success”, as shown in the picture below.


Figure 3: Creating USB share on a remote computer ( \\TEST-AFL-XYZ007\G ).

Once the USB share is created, the button in the corresponding row will be changed as well. To remove this share, just click the button “Remove Share/ Disconnect”, as shown in the picture 4.


Figure 4: To remove the share, click the button “Remove Share/ Disconnect” in the matching row.

If I want to disable the usage of USB sticks in order to prevent users from connecting to USB storage devices on this remote computer, I only need to click on the button “Enable/Disable All USB”, and the popup window will prompt me to confirm my decision, as shown in the picture 5. The usage of USB sticks connected to a remote computer could be enabled again by clicking on the same button.


Figure 5: Disabling USB sticks on the remote computer TEST-AFL-XYZ007.

If you find this tool useful and want to test it in your environment, please note that you have to run it as a user that have admin access to the remote computers. To run HTA program elevated via the Right Click Menu – Run as Administrator, please see my blog Run a Program Elevated via the Right Click Menu – Run as Administrator.

Please note: Although the author has made every reasonable attempt to achieve complete accuracy of the content, he assumes no responsibility for errors or omissions. Also, you should use this information as you see fit, and at your own risk.