WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

programmatically stop a USB device?

 
   Home -> Windows -> Device Driver RSS
Next:  Device Driver: Linksys 10/100 Lan Card  
Author Message
JM7

External


Since: Jun 18, 2004
Posts: 11



(Msg. 1) Posted: Mon Jul 11, 2005 8:31 am
Post subject: programmatically stop a USB device? Add to elertz
Archived from groups: microsoft>public>windowsxp>device_driver>dev, others (more info?)

Is there a way to programmatically stop a USB device, ie "Safely remove
hardware".

It could be in VB Script, batch file DOS commands or even VB6 Code.

The whole process of doing it from the Task bar is quite tedious.

Many thanks,

--
Back to top
Login to vote
Kelly

External


Since: Mar 04, 2004
Posts: 10490



(Msg. 2) Posted: Mon Jul 11, 2005 8:31 am
Post subject: Re: programmatically stop a USB device? Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Try it as a toggle VB Script.

--

All the Best,
Kelly (MS-MVP)

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



"JM7" <one.TakeThisOut@hotmail.com> wrote in message
news:u4LFw8ZhFHA.1244@TK2MSFTNGP14.phx.gbl...
> Is there a way to programmatically stop a USB device, ie "Safely remove
> hardware".
>
> It could be in VB Script, batch file DOS commands or even VB6 Code.
>
> The whole process of doing it from the Task bar is quite tedious.
>
> Many thanks,
>
> --
>
>
Back to top
Login to vote
Torgeir Bakken 1

External


Since: Mar 22, 2004
Posts: 2401



(Msg. 3) Posted: Mon Jul 11, 2005 8:54 am
Post subject: Re: programmatically stop a USB device? Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

JM7 wrote:

> Is there a way to programmatically stop a USB device, ie "Safely
> remove hardware".
>
> It could be in VB Script, batch file DOS commands or even VB6 Code.
>
> The whole process of doing it from the Task bar is quite tedious.
>
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
Back to top
Login to vote
JM7

External


Since: Jun 18, 2005
Posts: 11



(Msg. 4) Posted: Mon Jul 11, 2005 8:17 pm
Post subject: Re: programmatically stop a USB device? Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thank you so much - that was a brilliant find

"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam.TakeThisOut@hydro.com> wrote in message
news:#herHYehFHA.1948@TK2MSFTNGP12.phx.gbl...
> JM7 wrote:
>
> > Is there a way to programmatically stop a USB device, ie "Safely
> > remove hardware".
> >
> > It could be in VB Script, batch file DOS commands or even VB6 Code.
> >
> > The whole process of doing it from the Task bar is quite tedious.
> >
> 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
Back to top
Login to vote
Kelly

External


Since: Mar 04, 2004
Posts: 10490



(Msg. 5) Posted: Wed Jul 13, 2005 12:31 am
Post subject: Re: programmatically stop a USB device? Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Brilliant as always, Torgeir. Surprised)

--

All the Best,
Kelly (MS-MVP)

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



"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam RemoveThis @hydro.com> wrote in message
news:%23herHYehFHA.1948@TK2MSFTNGP12.phx.gbl...
> JM7 wrote:
>
>> Is there a way to programmatically stop a USB device, ie "Safely
>> remove hardware".
>>
>> It could be in VB Script, batch file DOS commands or even VB6 Code.
>>
>> The whole process of doing it from the Task bar is quite tedious.
>>
> 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
Back to top
Login to vote
Display posts from previous:   
       Home -> Windows -> Device Driver All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
  Windows XP
 Windows Vista
 Windows Other
 Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET