Solved

safely remove hardware (usb flash drives)

Posted on 2010-11-11
4
1,351 Views
Last Modified: 2012-06-27
Is there a MS (or 3rd party) api that would allow me to "safely remove hardware" (usb flash drives) in a Delphi app?  I'd like to be able to remove 4 to 10 drives at a time. (Then install a new batch of drives . . . etc.).

If not possible, is there a way to force cache to be written to the flash drive(s) in a manner that when a drive is later used, W7 won't insist on "fixing it".

Thanks - Ed
0
Comment
Question by:Ed-SSA
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
rogerard earned 500 total points
Comment Utility
Here is a site that has code to do what you want, with links to some addons that help for the times when the drives are being stubborn and not ejecting.
http://www.pocketappreview.com/main/item/17
0
 

Author Comment

by:Ed-SSA
Comment Utility
I suspect it might work. Examples are hard to come byt though and I have posted a question.
But it still doesn't answer the question, how does W7 know a drive needs "fixing"?
0
 
LVL 7

Expert Comment

by:rogerard
Comment Utility
I don't know the answer to the answer of how windows (not just w7) knows that a drive needs fixing except that it does.  I know that it occurs mostly on drives that were formatted using NTFS (FAT32 is more suited for quick eject).  If you download the addon utilities linked from the EjectUSB page (Unlocker, Handle.exe, DevEject, Removedrive, and Sync), you will rarely have a drive a drive that doesn't eject within a few seconds.  I think the addon sync is the key to the cache problem for you.
0
 

Author Closing Comment

by:Ed-SSA
Comment Utility
rogerard:

EjectUSB works great if I limit its work load. I now have 15 batch files (F-Eject.bat .. thru  T-Eject.bat) that I execute per drive as I finish with the one drive. While F-drive is ejecting, I'm formatting and filing G-drive, etc, etc.  EjectUSB is an excellent and very useful tool. Thanks very much for finding it for me.

-Ed

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
New Netapp Configuration 11 48
Robocopy questions 45 113
Live server Storage vMotion 5 46
Time Machine backup from iCloud 7 41
Solid State Drive Performance Tips: Solid state storage technology is now a standard.  After testing and using several different brands and revisions of SSD's over the years I have put together a collection of tips,tools and suggestions that I ha…
We all have limited time to study long and complicated information about RAID theories, but you may be interested as to how RAID 5 works. We made it simple for you by providing the shortest and easiest explanation ever.   First we need to remind …
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now