topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 1:54 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: USBDeview - Guaranteed eject of your USB drive  (Read 31727 times)

icekin

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 264
    • View Profile
    • icekin.com Technology,Computers and the Internet
    • Read more about this member.
    • Donate to Member
USBDeview - Guaranteed eject of your USB drive
« on: March 20, 2008, 05:37 PM »
USBDeview is a tiny program from the fine coders at Nirsoft that displays all the devices that are currently connected on your USB ports. What I like about it is the flawless eject operation. No more seeing this window :

[attachthumb=#1][/attachthumb]

Here is the main window of the program which can be run in the background while showing the USB icon in the tray. Pressing F9 disconnects the USB device every time I've tried.
[attachthumb=#2][/attachthumb]

I wonder if its possible to write a FARR plugin that can automatically call up USBDeview in the background to eject a USB drive. For example, I bring up FARR and type "eject <USB Device>" to automatically disconnect the device. In fact, I don't mind even if USBdeview is not involved as long as I can eject the device without seeing thr first window above.

taichimaster

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 160
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #1 on: March 20, 2008, 11:35 PM »
I would like such a FARR plugin or alias as well!  :up:

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,133
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #2 on: March 21, 2008, 12:49 AM »
Another great idea for a FARR plugin! :Thmbsup:

mitzevo

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 462
  • Control is power
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #3 on: March 21, 2008, 01:11 AM »
Nirsoft, Sysinternals, and a few others.. gotta love these tools ;) Power users must know about these tools!
The clock is running. Make the most of today. Time waits for no man. Yesterday is history. Tomorrow is a mystery. Today is a gift. That's why it is called the present.

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,133
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #4 on: March 21, 2008, 01:19 AM »
Only problem with Nirsoft is that I couldn't find a way to donate :-\ Even sent a mail about it, but didn't get a reply, so maybe it's the ultimate in giveaway freeware.  :Thmbsup:

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #5 on: March 21, 2008, 01:27 AM »
untested but something along this line will work as an alias. just change the path to USBDeview and the icons..

put this in RegEx pattern
^eject (.*)

and paste this in the "results" section.
USBDeview Stop $$1 | "C:\Tools\NirSoft\USBDeview.exe" /stop $$1 /ICON=icons\farr\core-misc_paste.ico
USBDeview Stop Drive - $$1 | "C:\Tools\NirSoft\USBDeview.exe" /stop_by_drive $$1 /ICON=icons\farr\core-misc_paste.ico

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,133
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #6 on: March 21, 2008, 02:00 AM »
thanks lanux! works!

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #7 on: March 21, 2008, 03:36 AM »
you're welcome, TucknDar. it's just a rehash of my own eject alias which i use to eject CD drives.

paulobrabo

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 88
  • The Brazilian Bomber
    • View Profile
    • Brabo Illustration
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #8 on: March 21, 2008, 08:08 AM »
You may also want to check USB Disk Ejector. Command line added for coolness.

"A program that allows you to quickly remove USB devices in Windows. It was originally designed to remove only USB pen drives but will now eject any USB device. It can be run as a non-visual command line program or a normal gui program. Its very useful if you have a USB flash/pen drive, especially if you use a menu such as PStart or the Portable Apps launcher."
English will never be my first language, it doesn't meter how hard I try.
« Last Edit: March 21, 2008, 08:10 AM by paulobrabo »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #9 on: March 21, 2008, 08:11 AM »
people should make a zip with a proper .alias file and the helper exe (USBDeview.exe) for things like this they want to share, it will make it easier for people to download and install.

icekin

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 264
    • View Profile
    • icekin.com Technology,Computers and the Internet
    • Read more about this member.
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #10 on: March 21, 2008, 08:52 AM »
thanks lanux! works!

Somehow, it doesn't quite work for me. I added the alias, but running the command after bringing up FARR does nothing. :(

I also noticed that USBDeView can eject any USB device, not just mass storage ones. Hitting disconnect all ended up disconnecting my usb tv tuner and mouse as well.

By the way, is there any way of reconnecting a device after ejecting it without having to pull it out of the USB port and replugging it back in?

icekin

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 264
    • View Profile
    • icekin.com Technology,Computers and the Internet
    • Read more about this member.
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #11 on: March 21, 2008, 08:59 AM »
You may also want to check USB Disk Ejector. Command line added for coolness.

Nice program, but it doesn't stop the dreaded "The device cannot be stopped right now..." message from appearing on my computer. Haven't tried the command line options though.

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #12 on: March 21, 2008, 09:05 AM »
Great idea for a FARR plugin! It would be great if when typing "eject " FARR lists all devices in the results list for the user to choose from. Some filters would also be useful. For example, I have a usb tv card that I never ever want to eject so it would make sense if I could exclude that.

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,133
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #13 on: March 21, 2008, 09:13 AM »
Somehow, it doesn't quite work for me. I added the alias, but running the command after bringing up FARR does nothing. :(
Ok, this is a bit weird, but it seems that on my system USBDEVIEW actually lists the wrong drive letter for my usb portable. Did you check to see if this might be the case for you too?

I use USBDLM to manage drive letters, and my Cruzer micro drive is always assigned to G: but for some reason it's listed as K: in USBDEVIEW. So 'eject G' won't work whereas 'eject K' works although the drive is definitely assigned to G...

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #14 on: March 21, 2008, 09:22 AM »
You may also want to check USB Disk Ejector. Command line added for coolness.

You should search the forum... this program was mentioned before.

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #15 on: March 21, 2008, 09:38 AM »
@icekin

Try with Unlocker (http://ccollomb.free.fr/unlocker/) first to unlock any file/process handles and then eject the device.

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #16 on: March 21, 2008, 10:46 AM »
By the way, is there any way of reconnecting a device after ejecting it without having to pull it out of the USB port and replugging it back in?

http://support.microsoft.com/kb/311272

ak_

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 223
    • View Profile
    • wopah
    • Read more about this member.
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #17 on: March 21, 2008, 11:09 AM »
I tried it and it couldn't eject a usb hard drive when its contents was displayed in Freecommander. So eject is not guaranteed after all. Too bad.

direnc

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #18 on: March 21, 2008, 01:03 PM »
Is such an utility really necessary ? Aren't FAT32 storage devices optimized for quick removal by default ? I just unplug mine as soon as any writing operation is complete. Any of you NTFS formatting drives?

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,133
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #19 on: March 21, 2008, 01:09 PM »
I can only answer for me, and I'm paranoid, hehe.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #20 on: March 21, 2008, 03:07 PM »
Is such an utility really necessary ? Aren't FAT32 storage devices optimized for quick removal by default ? I just unplug mine as soon as any writing operation is complete. Any of you NTFS formatting drives?

Why yes, all of my usb drives that are over 4GB are NTFS formatted...and I get this problem in *many* cases when I want to remove my portable drives from systems.  So this is a godsend.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #21 on: March 21, 2008, 05:57 PM »
Sounds like a somewhat dangerous utility - the reason you get the "can't be removed right now" message in the first place, is because some application is "using" the drive. Granted, most of the time it might just be a thread that has it's current working folder on the drive for some reason, which is pretty harmless, but other times you could risk filesystem corruption.

I wonder if such a "forcibly eject" application is actually any safer than simply unplugging the device?

I use NTFS and "optimize for speed" with my external drives, so I'm a bit paranoid about doing things the right way :)
- carpe noctem

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #22 on: March 21, 2008, 08:45 PM »
@f0dder

USBDeview has a "Safe To Unplug" column. See USBDeview page and scroll down for the "USBDeview Columns Description" section.

icekin

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 264
    • View Profile
    • icekin.com Technology,Computers and the Internet
    • Read more about this member.
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #23 on: March 22, 2008, 03:52 AM »
@icekin

Try with Unlocker (http://ccollomb.free.fr/unlocker/) first to unlock any file/process handles and then eject the device.

Is there a way to have a FARR shortcut that will automatically unlock using Unlocker and then eject the USB device?

Somehow, it doesn't quite work for me. I added the alias, but running the command after bringing up FARR does nothing. :(
Ok, this is a bit weird, but it seems that on my system USBDEVIEW actually lists the wrong drive letter for my usb portable. Did you check to see if this might be the case for you too?

I use USBDLM to manage drive letters, and my Cruzer micro drive is always assigned to G: but for some reason it's listed as K: in USBDEVIEW. So 'eject G' won't work whereas 'eject K' works although the drive is definitely assigned to G...

My problem is that I am not trying to eject a single drive, but a group of them. I use an external hard drive that had 5 partitions which are labelled drives G: to K:

In USBDeview, I can just locate the USB 2.0 Mass storage device and hit F9 eject. The FARR alias only allows me to eject a single drive and that too doesn't work :( My current solution has been to place a shortcut to USBDeView in my start menu, call it up with FARR each time, use the arrow keys to navigate to the device and then press F9.

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
Re: USBDeview - Guaranteed eject of your USB drive
« Reply #24 on: March 22, 2008, 07:37 AM »
I am not trying to eject a single drive, but a group of them

I know this is inelegant but couldn't you just write an old-fashioned batch file using USBDeview's command-line options
and call that from Farr?

USBD will show you the serial #s of G: to K: so you could just use 5 lines of the kind

usbdeview /stop_by_serial [serial number of G: here]
 .
 .
 .
usbdeview /stop_by_serial [serial number of K: here]

That way, if something shifts your drive letters around you'll still stop the external drive.