Question Locked

shortcut for safely removing hardware

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

i wanted 2 know how to remove hardware safely using a shorcut.
this shortcut should be direct.
i.e. when u press the shortcut key the device should be removed at the same time and no dialog box should pop up when doing this.

4 replies

by rob miners

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

http://ask-leo.com/is_there_a_way_to_safely_remove_hardware_from_a_batch_file.html

The DevCon command-line utility functions as an alternative to Device Manager

http://support.microsoft.com/?kbid=311272

http://technet2.microsoft.com/windowsserver/en/library/0b077318-2bac-4399-8230-461d5d2a055f1033.mspx?mfr=true

At a Command Prompt type in C:\devcon -m \\PC Name status * > dev.txt

Sample below with devcon in the Root Directory and it says that the Device has been Removed. It seems Ok after testing a few times.

@echo off
c:
C:\devcon.exe remove USBSTOR\DISK*
goto END

:END

by older mycroft

That with the absence of a Pop-up confirmation, you allow the possibility of Sod's Law.

Sod's Law would say that you can easily drive a car without a seat-belt so that when you want to get out of the car, you can do it quicker. But one in a million times you may find yourself leaving the car via the windscreen!!

When it comes to USB devices, I'll stick with the pop-up confirmation. ;)

by rob miners

it seems to work Ok but I personally will be using the tried and trusted method. ;)

This discussion is closed to new replies.