Command to eject a USB Mass storage device

P

Paul

Hi all,

Is there a command in XP, where u can
double on an icon / shortcut, and stop / eject a USB Mass storage device?

I know the Safely remove hardware icon
appears in the taskbar.

But can u make a shortcut to one of the devices on the desktop, so when u
double click on it, it'll stop / eject that device??

Any info appreciated

Thanx
 
T

Torgeir Bakken \(MVP\)

Paul said:
Is there a command in XP, where u can
double on an icon / shortcut, and stop / eject a USB Mass
storage device?

I know the Safely remove hardware icon
appears in the taskbar.

But can u make a shortcut to one of the devices on the desktop,
so when u double click on it, it'll stop / eject that device??

Any info appreciated
Hi,

To automate this, you can use deveject.exe available here (includes
C++ source code as well):

ftp://ftp.heise.de/pub/ct/listings/0316-208.zip

For help, run deveject.exe /? in a command prompt.

Works for Windows 2000/XP/2003.


An example using the EjectName command line switch:
deveject.exe -EjectName:"USB Mass Storage Device"
 
P

Paul

Thanx Torgeir. Will check it out

Cheers

Torgeir Bakken (MVP) said:
Hi,

To automate this, you can use deveject.exe available here (includes
C++ source code as well):

ftp://ftp.heise.de/pub/ct/listings/0316-208.zip

For help, run deveject.exe /? in a command prompt.

Works for Windows 2000/XP/2003.


An example using the EjectName command line switch:
deveject.exe -EjectName:"USB Mass Storage Device"



--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top