Welcome Guest.   Make a donation to an author on the site April 24, 2014, 02:01:28 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
View the new Member Awards and Badges page.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: USBDeview - Guaranteed eject of your USB drive  (Read 13614 times)
icekin
Supporting Member
**
Posts: 263

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: March 20, 2008, 05:37:42 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 :



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.


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.
Logged
taichimaster
Charter Member
***
Posts: 159



View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: March 20, 2008, 11:35:05 PM »

I would like such a FARR plugin or alias as well!  thumbs up
Logged

TucknDar
Charter Member
***
Posts: 1,093


Advanced coder of Nowt

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: March 21, 2008, 12:49:16 AM »

Another great idea for a FARR plugin! Thmbsup
Logged
mitzevo
Supporting Member
**
Posts: 460



Control is power

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #3 on: March 21, 2008, 01:11:35 AM »

Nirsoft, Sysinternals, and a few others.. gotta love these tools Wink Power users must know about these tools!
Logged

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
***
Posts: 1,093


Advanced coder of Nowt

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: March 21, 2008, 01:19:27 AM »

Only problem with Nirsoft is that I couldn't find a way to donate undecided Even sent a mail about it, but didn't get a reply, so maybe it's the ultimate in giveaway freeware.  Thmbsup
Logged
lanux128
Global Moderator
*****
Posts: 6,049



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: March 21, 2008, 01:27:37 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
Quote
^eject (.*)

and paste this in the "results" section.
[copy or print]
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
Logged

TucknDar
Charter Member
***
Posts: 1,093


Advanced coder of Nowt

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: March 21, 2008, 02:00:23 AM »

thanks lanux! works!
Logged
lanux128
Global Moderator
*****
Posts: 6,049



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: March 21, 2008, 03:36:56 AM »

you're welcome, TucknDar. it's just a rehash of my own eject alias which i use to eject CD drives.
Logged

paulobrabo
Supporting Member
**
Posts: 85


The Brazilian Bomber

View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: March 21, 2008, 08:08:07 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."
« Last Edit: March 21, 2008, 08:10:02 AM by paulobrabo » Logged

English will never be my first language, it doesn't meter how hard I try.
mouser
First Author
Administrator
*****
Posts: 32,700



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: March 21, 2008, 08:11:39 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.
Logged
icekin
Supporting Member
**
Posts: 263

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: March 21, 2008, 08:52:25 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. Sad

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?
Logged
icekin
Supporting Member
**
Posts: 263

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: March 21, 2008, 08:59:02 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.
Logged
Nod5
Supporting Member
**
Posts: 716



View Profile Give some DonationCredits to this forum member
« Reply #12 on: March 21, 2008, 09:05:51 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.
Logged
TucknDar
Charter Member
***
Posts: 1,093


Advanced coder of Nowt

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #13 on: March 21, 2008, 09:13:31 AM »

Somehow, it doesn't quite work for me. I added the alias, but running the command after bringing up FARR does nothing. Sad
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...
Logged
PhilB66
Supporting Member
**
Posts: 1,510


View Profile Give some DonationCredits to this forum member
« Reply #14 on: March 21, 2008, 09:22:45 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.
Logged
PhilB66
Supporting Member
**
Posts: 1,510


View Profile Give some DonationCredits to this forum member
« Reply #15 on: March 21, 2008, 09:38:09 AM »

@icekin

Try with Unlocker (http://ccollomb.free.fr/unlocker/) first to unlock any file/process handles and then eject the device.
Logged
PhilB66
Supporting Member
**
Posts: 1,510


View Profile Give some DonationCredits to this forum member
« Reply #16 on: March 21, 2008, 10:46:57 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
Logged
ak_
Supporting Member
**
Posts: 223


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #17 on: March 21, 2008, 11:09:57 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.
Logged

direnc
Supporting Member
**
Posts: 5


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #18 on: March 21, 2008, 01:03:10 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?
Logged
TucknDar
Charter Member
***
Posts: 1,093


Advanced coder of Nowt

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #19 on: March 21, 2008, 01:09:36 PM »

I can only answer for me, and I'm paranoid, hehe.
Logged
wraith808
Supporting Member
**
Posts: 5,815



"In my dreams, I always do it right."

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #20 on: March 21, 2008, 03:07:46 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.
Logged

f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #21 on: March 21, 2008, 05:57:07 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 smiley
Logged

- carpe noctem
PhilB66
Supporting Member
**
Posts: 1,510


View Profile Give some DonationCredits to this forum member
« Reply #22 on: March 21, 2008, 08:45:01 PM »

@f0dder

USBDeview has a "Safe To Unplug" column. See USBDeview page and scroll down for the "USBDeview Columns Description" section.
Logged
icekin
Supporting Member
**
Posts: 263

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #23 on: March 22, 2008, 03:52:11 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. Sad
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 Sad 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.
Logged
cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,158



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #24 on: March 22, 2008, 07:37:07 AM »

Quote
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.

Logged

Chris
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.054s | Server load: 0.05 ]