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 

Hi,

This works fine, but when you have two MAXTOR ONETOUCH, the ID is almost the same, and when you that the whole ID, it has problems with the & .
Do you know a solution for this ?

Posted by: Stijn Smets at August 10, 2005 1:33 AM

You should be able to enclose the ID in quotes.

Posted by: Leo at August 12, 2005 7:26 PM

My remove safely icon disappeared also, and the system reboots when USB SD card reader is removed. (and sometimes whane a flash memory decice is removed)

Tried that "safely Remove" and when stopping a device the Machine still reboots when even SELECTING a device (WIN XP SP 2) - got rid of THAT quick!

Posted by: Tom at September 16, 2005 4:43 PM

this works well!
i love it...

for me .. creating a batch file.. with this.. seems to be the best way to remove thumb drives..

devcon remove usb\vid*

Posted by: faRID at September 21, 2005 9:04 PM

I've WindowsXP installed in my PC with whole system functioning very well. But, I generally don't see any "safely remove your hardware" icon in the system tray when I plug any USB flash device. It appears only when I log off windows and log it on again.
I've got a USB memory-card-reader attached with my system. It suggests this icon to be appered always. Though the card is still in function, it doesn't make the icon on the tray appear always anymore, even not in case of plugging any new flash drive.

I need your suggestion very much.

Thank you.

Posted by: Echo zi at December 7, 2005 10:26 PM

For those of you who do not see the icon in their system tray, you may run this command to bring it up:

%windir%\system32\RUNDLL32 shell32.dll,Control_RunDLL hotplug.dll


If you want to control the behavior of the Safely Remove Hardware icon in your system tray, do the following:

1. Right-Click on the Task Bar
2. Select Properties
3. Under the taskbar tab, click the Customize button
4. Select the program you wish to hide
5. Under the drop down box, select Always Hide, Always Show, or Hide when inactive.
6. Click OK

enjoy :)

Posted by: razor2000 at December 12, 2005 8:02 AM

Thanks for the string. I created a .bat file with in notepad called "Eject.bat" (adding a carriage return at the end of your string) then placed a shortcut to it in my Quick launch bar.

Works a treat.

Posted by: skeetabomb at January 3, 2006 6:28 AM

I did as skeetabomb but for those who doesnt know procedure

-create new text document.txt with right click on Desktop

-copy command from razor2000 (thanx razor2000) %windir%\system32\RUNDLL32 shell32.dll,Control_RunDLL hotplug.dll

-paste it in to .txt file

-save

-rename to whatever.bat

Thanks razor and skeetabomb

Posted by: Gasper Loborec at January 6, 2006 4:51 AM

It seems a lot of people can't find the Safely Remove icon on their taskbar! Me included. It just disappeared, and my Tosh gets very upset if I change the floppy drive for the CD drive, since I can't "safely remove".

If anyone has found the answer I'd be most grateful for an email. Thanks. Harry
harry@tifosi.net

Posted by: harry at January 18, 2006 12:37 PM

For the Safely Remove Hardware to appear you need to:

Right click on the drive (my instance drive I)

Click Properties
Click Hardware tab
Highlight your drive
Click properties
Click policies tab
Click optimize for performance.
Click Ok.
Click apply.

You may have to restart your computer but thats how it worked for me.

For some reason XP sometimes selects optimize for quick removal as an option.

pete

Posted by: pete at January 30, 2006 2:17 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!