Ask Leo! by Leo A. Notenboom

Is there a way to "Safely Remove Hardware" from a batch file?

Search First! Then browse: Categories | Full Archive | By Date | Newsletter

Home » Hardware » USB and 1394 Interfaces

Comments

Read the article that everyone's commenting on.
RSS feed Subscribe to the RSS Feed for comments on this article.

Comment Page:  1  |  2  |  3  |  4  |  5 

I used devcon to remove a usb external hard drive, but then the device automatically reinstalls. I'm trying to find a way to just "stop" the device so that the disk doesn't get corrupted when the users just pull its plug. I'm having a hard time finding a good solution.

Posted by: jason at May 27, 2004 9:53 AM

I'm surprised the drive re-detects right away. I'd only expect that on a reboot, or perhaps accompanying some other device install. Not sure how to address that.

One thing you might try to avoid corruption is "sync", a tool that fluishes buffers to disk on NTFS drives - http://ask-leo.com/d-40527b

Posted by: Leo at May 27, 2004 6:58 PM

This question is remotely related but not specific to the info above.

My "Safely Remove Hardware" icon (Windows XP)has disappeared and I've tried everything I know of to restore it to the taskbar. In the taskbar Properties I have it flagged as "Always Show" along with other icons, but it does not appear in the taskbar when using any USB device...external CD burner, camera, etc.. Don't know what to do.

Posted by: Dave Paquin at November 16, 2004 6:10 AM

Great tool. Nice to automate the safe removal of my iPod using a simple batch file. One thing I noticed tho is that when you use the safely remove hardware in the system try and than reattatch the device, XP simply picks up the device and activates it. But when you use the remove command with devcon and than reconnect the device it has to reinstall it as new hardware again. I assume "devcon remove" totally gets rid of all the drivers that were installed with the device. Any ideas on this??

Posted by: Andrew at November 18, 2004 5:14 PM

i have a windows xp compac computer the icon is in my task bar is it safe to remove it i dont know what to do i had my computer for 3 months help

Posted by: dawna_harvey at November 26, 2004 7:38 AM

Try 'devcon disable ' instead - this means it will not automatically re-install. However, the device will remain disabled once you plug it back in, so you will also need a file which runs as 'devcon enable ' which you will need to run when re-inserting. Still, 2 double-clicks and two icons can be a much more convenient solution!

Posted by: Koina Donner at March 31, 2005 4:40 AM

You may use "Device Eject" (DevEject.zip) - a software from the german computer magazine c't - Soft-Link 0316208 (http://www.heise.de/ct/03/16/links/208.shtml) - sourcecode is included. It can be used for usb and firewire devices.

Posted by: Tintin at April 14, 2005 2:20 AM

Try this utility: http://safelyremove.com/safelyremovesetup.zip

Posted by: RHoST at May 5, 2005 12:33 PM

I downloaded the devcon file but it will not run with the message "missing
export SETUPAPIDLL.COM ..."
Is any one familiar with message and how to fix this problem.

Posted by: Aditya Mishra at May 30, 2005 4:06 PM

My unplug or eject hardware icon has disappeared too. I'm not sure what to do about it or how to fix it? I've searched google for answers and found some, but none fix the problem. I don't want to use some other software to unplug or eject hardware. If anyone has any solutions I would really appreciate the help. Thanks.

Travis
San Diego, CA.

Posted by: Travis at August 3, 2005 11:56 AM
Comment Page:  1  |  2  |  3  |  4  |  5 
Read the article that everyone's commenting on.
RSS feed Subscribe to the RSS Feed for comments on this article.
Post a Comment

Question? Ask Leo!