• Hey there, Guest! Share your idea for a new trophy in the forums and win bragging rights and a $100 Amazon gift card! Check out the New Community Trophy Contest here!
  • Pardon our dust as we work on some regularly scheduled forum maintenance. You may notice some missing features during this time. Thank you for your patience!

Removal of USB Disk under Command Line Control

G

Guest

Guest
Archived from groups: microsoft.public.win2000.general,microsoft.public.windowsxp.general (More info?)

I am using a number of external USB disks for data
backup. The backup process is controlled by a scheduled
batch file.

Does anyone know how to disconnect such a drive
with a command (rather than via the usual GUI)
so that the user needs to do nothing other than
unplug one drive and plug in another?
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general,microsoft.public.windowsxp.general (More info?)

Glad you got your solution.

FWIW (at least a chuckle) Kelly and Yves (the content free respondents)
have blessed the NG with 3 posts each since June 2004.

Yves' other 2 posts were intended to help the OPs, and maybe did.

Only one of Kelly's 2 other posts is still readable in my reader, and
it's a one liner telling the OP (whose question was about W2kSP4) that
"This is an XP newsgroup." Of course that's wrong.

Kelly runs an XP tipsntricks-type website that I'll bet is full of stuff
pasted from these NGs. Whether it is or not, I hope the material in it
is not so blatantly bad as Kelly's only other 'contribution' to this NG.

Neither of these characters is what I'd call a stellar contributor like
yourself! LOL :)

Pegasus (MVP) wrote:

> I am using a number of external USB disks for data
> backup. The backup process is controlled by a scheduled
> batch file.
>
> Does anyone know how to disconnect such a drive
> with a command (rather than via the usual GUI)
> so that the user needs to do nothing other than
> unplug one drive and plug in another?
>
>
 

kelly

Distinguished
Apr 14, 2004
1,761
0
19,780
0
Archived from groups: microsoft.public.win2000.general,microsoft.public.windowsxp.general (More info?)

Refresh us all. You are an MVP for which division?

--

All the Best,
Kelly (MS-MVP)

Troubleshooting Windows XP
http://www.kellys-korner-xp.com

In memory of those lost during Katrina &
Prayers and Hope for the remaining displaced.



"Pegasus (MVP)" <I.can@fly.com> wrote in message
news:exTmfWbvFHA.3860@TK2MSFTNGP09.phx.gbl...
>I am using a number of external USB disks for data
> backup. The backup process is controlled by a scheduled
> batch file.
>
> Does anyone know how to disconnect such a drive
> with a command (rather than via the usual GUI)
> so that the user needs to do nothing other than
> unplug one drive and plug in another?
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general,microsoft.public.windowsxp.general (More info?)

Pegasus (MVP) wrote:

> I am using a number of external USB disks for data
> backup. The backup process is controlled by a scheduled
> batch file.
>
> Does anyone know how to disconnect such a drive
> with a command (rather than via the usual GUI)
> so that the user needs to do nothing other than
> unplug one drive and plug in another?
>
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"


Here is the readme.txt file, translated from German to English (by me):

DevEject -- Safely remove hardware automatically, for Windows 2000/XP/2003
=================================================================

DevEject enables you to programmatically stop mass storage devices such
as FireWire disks or USB-sticks

DevEject.exe -- the compiled executable
DevEject.cpp -- Source code in C++




--
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
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general,microsoft.public.windowsxp.general (More info?)

I think perhaps the "crossposting" was missed? :)

Dan Seur wrote:

> Glad you got your solution.
>
> FWIW (at least a chuckle) Kelly and Yves (the content free respondents)
> have blessed the NG with 3 posts each since June 2004.
>
> Yves' other 2 posts were intended to help the OPs, and maybe did.
>
> Only one of Kelly's 2 other posts is still readable in my reader, and
> it's a one liner telling the OP (whose question was about W2kSP4) that
> "This is an XP newsgroup." Of course that's wrong.
>
> Kelly runs an XP tipsntricks-type website that I'll bet is full of stuff
> pasted from these NGs. Whether it is or not, I hope the material in it
> is not so blatantly bad as Kelly's only other 'contribution' to this NG.
>
> Neither of these characters is what I'd call a stellar contributor like
> yourself! LOL :)
>
> Pegasus (MVP) wrote:
>
>> I am using a number of external USB disks for data
>> backup. The backup process is controlled by a scheduled
>> batch file.
>>
>> Does anyone know how to disconnect such a drive
>> with a command (rather than via the usual GUI)
>> so that the user needs to do nothing other than
>> unplug one drive and plug in another?
>>
>>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general,microsoft.public.windowsxp.general (More info?)

On Tue, 20 Sep 2005 14:16:24 -0400 in
microsoft.public.windowsxp.general, Dan Seur favored us with...
> FWIW (at least a chuckle) Kelly and Yves (the content free respondents)
> have blessed the NG with 3 posts each since June 2004.

You might want to look at the Newsgroups line before you go on
about "the NG" and "this newsgroup". :)

I have to admit that Kelly's responses the last few days have
seemed less helpful than I might wish, but we should cut her some
slack as she's recovering from a huge natural disaster and she is
usually extremely helpful. Try googling for her in her usual place,
microsoft.public.windowsxp.general (which is where I'm reading your
note). and you'll see she is one of the most frequent people
providing answers.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"To put it bluntly but fairly, anyone today who doubts that the
variety of life on this planet was produced by a process of
evolution is simply ignorant -- inexcusably ignorant, in a world
where three out of four people have learned to read and write."
--Daniel Dennett, /Darwin's Dangerous Idea/ (1995), page 46
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general,microsoft.public.windowsxp.general (More info?)

Yes, right. Blinded by ... I dunno, sumpn I guess. :)

Bob I wrote:

> I think perhaps the "crossposting" was missed? :)
>
> Dan Seur wrote:
>
>> Glad you got your solution.
>>
>> FWIW (at least a chuckle) Kelly and Yves (the content free
>> respondents) have blessed the NG with 3 posts each since June 2004.
>>
>> Yves' other 2 posts were intended to help the OPs, and maybe did.
>>
>> Only one of Kelly's 2 other posts is still readable in my reader, and
>> it's a one liner telling the OP (whose question was about W2kSP4) that
>> "This is an XP newsgroup." Of course that's wrong.
>>
>> Kelly runs an XP tipsntricks-type website that I'll bet is full of
>> stuff pasted from these NGs. Whether it is or not, I hope the material
>> in it is not so blatantly bad as Kelly's only other 'contribution' to
>> this NG.
>>
>> Neither of these characters is what I'd call a stellar contributor
>> like yourself! LOL :)
>>
>> Pegasus (MVP) wrote:
>>
>>> I am using a number of external USB disks for data
>>> backup. The backup process is controlled by a scheduled
>>> batch file.
>>>
>>> Does anyone know how to disconnect such a drive
>>> with a command (rather than via the usual GUI)
>>> so that the user needs to do nothing other than
>>> unplug one drive and plug in another?
>>>
>>>
>>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general,microsoft.public.windowsxp.general (More info?)

I'm corrected on Kelly's comment; I missed the crosspost to the XP
group; see above. I guess Kelly doesn't spend much time (if any) in the
ms.p.w2k.gen, which is dandy...and perhaps she too missed the crosspost...?

In any event, I hope Rita doesn't further unnerve her.

Stan Brown wrote:

> On Tue, 20 Sep 2005 14:16:24 -0400 in
> microsoft.public.windowsxp.general, Dan Seur favored us with...
>
>>FWIW (at least a chuckle) Kelly and Yves (the content free respondents)
>>have blessed the NG with 3 posts each since June 2004.
>
>
> You might want to look at the Newsgroups line before you go on
> about "the NG" and "this newsgroup". :)
>
> I have to admit that Kelly's responses the last few days have
> seemed less helpful than I might wish, but we should cut her some
> slack as she's recovering from a huge natural disaster and she is
> usually extremely helpful. Try googling for her in her usual place,
> microsoft.public.windowsxp.general (which is where I'm reading your
> note). and you'll see she is one of the most frequent people
> providing answers.
>
 

kelly

Distinguished
Apr 14, 2004
1,761
0
19,780
0
Archived from groups: microsoft.public.win2000.general,microsoft.public.windowsxp.general (More info?)

Thanks, Stan.

--

All the Best,
Kelly (MS-MVP)

Troubleshooting Windows XP
http://www.kellys-korner-xp.com

In memory of those lost during Katrina &
Prayers and Hope for the remaining displaced.



"Stan Brown" wrote in message
news:MPG.1d9a2b14448cd00f989825@news.individual.net...
> On Tue, 20 Sep 2005 14:16:24 -0400 in
> microsoft.public.windowsxp.general, Dan Seur favored us with...
>> FWIW (at least a chuckle) Kelly and Yves (the content free respondents)
>> have blessed the NG with 3 posts each since June 2004.
>
> You might want to look at the Newsgroups line before you go on
> about "the NG" and "this newsgroup". :)
>
> I have to admit that Kelly's responses the last few days have
> seemed less helpful than I might wish, but we should cut her some
> slack as she's recovering from a huge natural disaster and she is
> usually extremely helpful. Try googling for her in her usual place,
> microsoft.public.windowsxp.general (which is where I'm reading your
> note). and you'll see she is one of the most frequent people
> providing answers.
>
> --
> Stan Brown, Oak Road Systems, Tompkins County, New York, USA
> http://OakRoadSystems.com/
> "To put it bluntly but fairly, anyone today who doubts that the
> variety of life on this planet was produced by a process of
> evolution is simply ignorant -- inexcusably ignorant, in a world
> where three out of four people have learned to read and write."
> --Daniel Dennett, /Darwin's Dangerous Idea/ (1995), page 46
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general,microsoft.public.windowsxp.general (More info?)

Not for the subject under discussion - hence my post!
Do you know the answer?


"Kelly" <kelly@mvps.org> wrote in message
news:u32PPnbvFHA.2064@TK2MSFTNGP09.phx.gbl...
> Refresh us all. You are an MVP for which division?
>
> --
>
> All the Best,
> Kelly (MS-MVP)
>
> Troubleshooting Windows XP
> http://www.kellys-korner-xp.com
>
> In memory of those lost during Katrina &
> Prayers and Hope for the remaining displaced.
>
>
>
> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> news:exTmfWbvFHA.3860@TK2MSFTNGP09.phx.gbl...
> >I am using a number of external USB disks for data
> > backup. The backup process is controlled by a scheduled
> > batch file.
> >
> > Does anyone know how to disconnect such a drive
> > with a command (rather than via the usual GUI)
> > so that the user needs to do nothing other than
> > unplug one drive and plug in another?
> >
> >
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general,microsoft.public.windowsxp.general (More info?)

If your are a MVP, shouldn't you already "know" the answer?


"Pegasus (MVP)" <I.can@fly.com> wrote in message
news:uBQbUrbvFHA.596@TK2MSFTNGP12.phx.gbl...
> Not for the subject under discussion - hence my post!
> Do you know the answer?
>
>
> "Kelly" <kelly@mvps.org> wrote in message
> news:u32PPnbvFHA.2064@TK2MSFTNGP09.phx.gbl...
>> Refresh us all. You are an MVP for which division?
>>
>> --
>>
>> All the Best,
>> Kelly (MS-MVP)
>>
>> Troubleshooting Windows XP
>> http://www.kellys-korner-xp.com
>>
>> In memory of those lost during Katrina &
>> Prayers and Hope for the remaining displaced.
>>
>>
>>
>> "Pegasus (MVP)" <I.can@fly.com> wrote in message
>> news:exTmfWbvFHA.3860@TK2MSFTNGP09.phx.gbl...
>> >I am using a number of external USB disks for data
>> > backup. The backup process is controlled by a scheduled
>> > batch file.
>> >
>> > Does anyone know how to disconnect such a drive
>> > with a command (rather than via the usual GUI)
>> > so that the user needs to do nothing other than
>> > unplug one drive and plug in another?
>> >
>> >
>>
>>
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general,microsoft.public.windowsxp.general (More info?)

Sheesh, just cause one is an MVP, doesn't mean we know everything!

Yves Leclerc wrote:

> If your are a MVP, shouldn't you already "know" the answer?
>
>
> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> news:uBQbUrbvFHA.596@TK2MSFTNGP12.phx.gbl...
>
>>Not for the subject under discussion - hence my post!
>>Do you know the answer?
>>
>>
>>"Kelly" <kelly@mvps.org> wrote in message
>>news:u32PPnbvFHA.2064@TK2MSFTNGP09.phx.gbl...
>>
>>>Refresh us all. You are an MVP for which division?
>>>
>>>--
>>>
>>>All the Best,
>>>Kelly (MS-MVP)
>>>
>>>Troubleshooting Windows XP
>>>http://www.kellys-korner-xp.com
>>>
>>>In memory of those lost during Katrina &
>>>Prayers and Hope for the remaining displaced.
>>>
>>>
>>>
>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>news:exTmfWbvFHA.3860@TK2MSFTNGP09.phx.gbl...
>>>
>>>>I am using a number of external USB disks for data
>>>>backup. The backup process is controlled by a scheduled
>>>>batch file.
>>>>
>>>>Does anyone know how to disconnect such a drive
>>>>with a command (rather than via the usual GUI)
>>>>so that the user needs to do nothing other than
>>>>unplug one drive and plug in another?
>>>>
>>>>
>>>
>>>
>>
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general,microsoft.public.windowsxp.general (More info?)

In news:e6lE1zfvFHA.3000@TK2MSFTNGP12.phx.gbl,
Yves Leclerc <yleclercNOSPAM@sympatico.ca> typed:

> If your are a MVP, shouldn't you already "know" the answer?


Microsoft's MVP award doesn't provide instant omniscience to the
awardee. First, MVPs all have different areas of interest and
knowledge. Second, none of us knows everything, not even in our
particular areas.

--
Ken Blake - Microsoft MVP Windows: Shell/User
Please reply to the newsgroup



>
>
> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> news:uBQbUrbvFHA.596@TK2MSFTNGP12.phx.gbl...
>> Not for the subject under discussion - hence my post!
>> Do you know the answer?
>>
>>
>> "Kelly" <kelly@mvps.org> wrote in message
>> news:u32PPnbvFHA.2064@TK2MSFTNGP09.phx.gbl...
>>> Refresh us all. You are an MVP for which division?
>>>
>>> --
>>>
>>> All the Best,
>>> Kelly (MS-MVP)
>>>
>>> Troubleshooting Windows XP
>>> http://www.kellys-korner-xp.com
>>>
>>> In memory of those lost during Katrina &
>>> Prayers and Hope for the remaining displaced.
>>>
>>>
>>>
>>> "Pegasus (MVP)" <I.can@fly.com> wrote in message
>>> news:exTmfWbvFHA.3860@TK2MSFTNGP09.phx.gbl...
>>>> I am using a number of external USB disks for data
>>>> backup. The backup process is controlled by a scheduled
>>>> batch file.
>>>>
>>>> Does anyone know how to disconnect such a drive
>>>> with a command (rather than via the usual GUI)
>>>> so that the user needs to do nothing other than
>>>> unplug one drive and plug in another?
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general,microsoft.public.windowsxp.general (More info?)

"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:uIW4DubvFHA.908@tk2msftngp13.phx.gbl...
> Pegasus (MVP) wrote:
>
> > I am using a number of external USB disks for data
> > backup. The backup process is controlled by a scheduled
> > batch file.
> >
> > Does anyone know how to disconnect such a drive
> > with a command (rather than via the usual GUI)
> > so that the user needs to do nothing other than
> > unplug one drive and plug in another?
> >
> 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"
>
>
> Here is the readme.txt file, translated from German to English (by me):
>
> DevEject -- Safely remove hardware automatically, for Windows 2000/XP/2003
> =================================================================
>
> DevEject enables you to programmatically stop mass storage devices such
> as FireWire disks or USB-sticks
>
> DevEject.exe -- the compiled executable
> DevEject.cpp -- Source code in C++
> --
> 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

Nice one - thanks for your help. My previous eject tool
(eject.exe by WebGeek) worked fine for CD/DVD drives
but failed for USB drives.