topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday March 28, 2024, 2:24 pm
  • 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: IDEA: Terminate processes and remove USB  (Read 24045 times)

vevola

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 104
  • VeVoLa
    • View Profile
    • Donate to Member
IDEA: Terminate processes and remove USB
« on: April 29, 2006, 11:48 AM »
Often using my USP device, I'mnot ableto remove it because something's open (sometimes it's just Explorer or something like that).

I'd like a program that could substitute the Remove USB Device icon and function of Windows, and substitute it with something that would automatically terminate all processes running via USB (whether it be an exe or a doc) and detach hassle-free my USB device.

First... would this be safe? and is it possible?

Thanks!
vevola

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Terminate processes and remove USB
« Reply #1 on: May 01, 2006, 01:25 PM »
 :) Try this one!

CloseAndEject [/url] - Close all open files before ejecting a drive.



Features:
- Press Eject to close all handles and eject the drive.
- Double leftclick a line to activate the process.
- Double rightclick a line to kill the process.
- Command line: CloseAndEject.exe <Drives> Eject
     Example: CloseAndEject.exe DE Eject
     Closes open files on drive D and E, ejects and exits.
- Uses Handle.exe by http://www.sysinternals.com/utilities/handle.html
- Use with caution! Closing handles can cause bluescreens!

You'll find the downloads and more info at 1 Hour Software by Skrommel.

Skrommel
« Last Edit: May 01, 2006, 01:46 PM by skrommel »

vevola

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 104
  • VeVoLa
    • View Profile
    • Donate to Member
Re: IDEA: Terminate processes and remove USB
« Reply #2 on: May 02, 2006, 04:26 PM »
you're a genius skrommel!

would it be possible to:
- iconize to system tray;
- auto-refresh;
- on "EJECT" put OK/CANCEL;
- make it easier to distinguish which drive (perhaps a pulldown menu, where you choose which drive, and upon choice you see only what is running from there);

By the way, I'm using PStart off a 2GB Micro Cruzer and it wasn't shown, nor was it closed when ejected. to C&E it says that the drive was ejected, but in fact it closed everything except PStart (which it didn't even see) and it did not eject my drive.

thanks guy! we'll get you some points!  ;)
-vevola



skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Terminate processes and remove USB
« Reply #3 on: May 03, 2006, 05:31 AM »
 :tellme: CloseAndEject uses Handles.exe from SysInternals, and it didn't find my USB by default either.

Would it be too much trouble to ask you to send me the file handles.txt from your CloseAndEject folder?

Skrommel
« Last Edit: May 03, 2006, 05:33 AM by skrommel »

Cavalcader

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 194
  • Live Long & Prosper
    • View Profile
    • Donate to Member
Re: IDEA: Terminate processes and remove USB
« Reply #4 on: May 07, 2006, 03:44 PM »
Another possibility is Unlocker -- a very cool ShellExtension.
My Linguistic Profile:
  40% General American English
  30% Yankee
  20% Dixie

What Kind of American English Do You Speak?

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,066
    • View Profile
    • Donate to Member
Re: IDEA: Terminate processes and remove USB
« Reply #5 on: May 07, 2006, 07:26 PM »
I must admit I think unlocker is great (and I use it a lot) but don't be too complacent with it - I'm not sure how cleanly it shuts down file connections with applications and with a USB connection it may lead to data corruption. It is great in a crisis though.

Cavalcader

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 194
  • Live Long & Prosper
    • View Profile
    • Donate to Member
Re: IDEA: Terminate processes and remove USB
« Reply #6 on: May 08, 2006, 10:53 AM »
I'm not sure how cleanly it shuts down file connections with applications
-Carol Haynes (May 07, 2006, 07:26 PM)
True. That's a consideration with any of the techniques above -- they're all nonstandard methods, but one bonus of Unlocker is that it shows the name of the program that has the file lock (without listing a bunch of other stuff). Then you still have the option to close that program normally. :)
My Linguistic Profile:
  40% General American English
  30% Yankee
  20% Dixie

What Kind of American English Do You Speak?

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,837
    • View Profile
    • Donate to Member
Re: IDEA: Terminate processes and remove USB
« Reply #7 on: May 16, 2006, 07:31 AM »
hmm, closeandEject doesn't see my external HD (d:) at all.
a pity. Maybe it's handle.exe's fault? By the way, i extracted handle.exe in the same dir where CaE is... not sure if that's enough or if I should add it somewhere in the PATH...

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Terminate processes and remove USB
« Reply #8 on: June 01, 2006, 04:03 AM »
There's also OpenedFilesView at http://www.nirsoft.net/utils/opened_files_view.html.

Skrommel