Jump to content

Home

Quick and Easy Week - The Revenge


Benny

Recommended Posts

Quick And Easy Week Day 7

 

Quick and Easy week comes to a close with the USB Disk Ejector.

 

This was originally a program that I wrote for my own use and released just to see if anyone found it useful. Apparently people did and it was surprisingly popular.

 

In response to user requests I’ve now beefed it up significantly. This new version has been completely re-written and has many new features. It now works on Vista, can run as a command line application and can eject drives from the command line based on drive letter, drive name or partial drive name.

 

The new command line options make it especially suitable for use with a flash/pen drive, especially if you use a menu such as PStart or the Portable Apps launcher. Eg. I have PStart setup to run the program with the command line option “/EJECTTHIS’. When I run it, the program loads silently, ejects the pen drive and exits. This works regardless of the drive letter that Windows assigns the drive. I strongly recommended that you check out the readme for more information on the new command line options and how they can be used.

 

The full list of changes can be seen on the site.

Download it here

 

USBDiskEjectorSmall.gif

 

 

I'll be uploading the source to all the programs later today. I'd also like to thank everyone for their words of encouragement and especially Gabez for updating Mojo about this every day.

Link to comment
Share on other sites

Quick and Easy week comes to a close with the USB Disk Ejector.

Nice. The icons are great, even the "No Disk Found" one. :D Quality stuff -- it works exactly as described.

 

Once upon a time I was trying to write a USB ejection program with the goal of telling you which application was preventing it from ejecting. I then ran into a dead end with the APIs so I gave the whole thing up thinking it wouldn't be handy. You proved me wrong! :p Good job. :)

 

 

P.S.

 

Why this? (style.css, line 92):

a:hover {
color:#83A4B5;
text-decoration:line-through;  /* to trick new people? */
}
Link to comment
Share on other sites

P.S.

Why this? (style.css, line 92):

a:hover {
color:#83A4B5;
text-decoration:line-through;  /* to trick new people? */
}

 

Ah, that. That's one of those things that I've been meaning to change...for 2 years. I'll fix it eventually, first I've got to do something about the awful new paypal buttons that paypal's decided to switch to :¬:

 

 

I'm glad you like the USB Disk Ejector. Other features that are still on the todo/might do list are:

  • Checking what apps have an open handle to the drive (as you said)
  • Finding and closing explorer windows related to the drive (annoyingly, Vista wont eject disks if they still have a window open in explorer)
  • Detecting Windows shutdown/restart/logoff and halting it for 5 seconds while a (cancelable) warning displays reminding you that the usb drive is still plugged in (very handy for public pc's where I always end up forgetting my pen drive)
  • Adding an 'eject in x seconds' or a 'keep trying to eject for x seconds' command. If I'm using something like portable firefox and I try and eject the disk I'm not able to since p. firefox takes a while to finish closing. This would have solve that problem. Of course so would a bit of patience.
  • Configurable hotkeys to eject drives

Link to comment
Share on other sites

Checking what apps have an open handle to the drive (as you said)

If you're successful at that, clue me in on what strategy you ended up using. I couldn't find any USB function that returned the process id that held the lock.

Finding and closing explorer windows related to the drive (annoyingly, Vista wont eject disks if they still have a window open in explorer)
I didn't know that. I considered that a feature of XP's intelligent handling of USB drives. You'd think that'd be configurable somewhere in Vista.

 

Those are all good ideas for features. Coupling the hotkey with the "keep trying to eject" would be a great combo.

Link to comment
Share on other sites

Quick And Easy Week: The Epilogue

 

I’ve now uploaded the source code to all the programs released this week. I offer no guarantees on its quality, some of it is based on 5 year old code from when I was learning programming and a lot of it is ongoing development code, peppered with todo’s. Much of it shows a disregard for coding conventions and I haven’t yet found the time to refactor and clean it up. In short, your mileage may vary.

 

Download it here.

Link to comment
Share on other sites

  • 2 weeks later...

Woo, this stuff is brilliant, especially the replacement installers! It's such a pain when you can't even get things installed because of silly compatibility problems with today's space-age operating systems. Great work Benzo!

Link to comment
Share on other sites

  • 3 years later...

To whom it may concern:

I am using disk eject from command line and it works great...as long as USB drive is plugged directly into laptop. If it is plugged in to a USB hub it indicates that the drive is in use and will not eject it. Is there any way around this? Love the program!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...