Solved

safely remove hardware (usb flash drives)

Posted on 2010-11-11
4
1,354 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 Covney
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
rogerard earned 500 total points
ID: 34114400
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
 
LVL 3

Author Comment

by:Ed Covney
ID: 34117288
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
ID: 34120169
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
 
LVL 3

Author Closing Comment

by:Ed Covney
ID: 34124594
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Raid 0 2 90
Dell PowerEdge 2950 crashing on a weekly basis 5 79
Mount cloned RDM in Windows VM without formatting 6 67
Java array 21 86
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…
The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
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…

733 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