Command Prompt Command to:

G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.hardware (More info?)

By chance is there a command prompt command that can be run from a
batch file that allows removing a connected USB device safely? I'm
thinking of using a USB HDD for unattended backup. The drive will be
connected via a USB cable but AC power to it will be turned ON and OFF
via a timer function (so the drive doesn't spin when not in actual
use). Manual testing of AC power ON and OFF seems to work OK but at
times a message pops up saying the device was disconnected in an usafe
manner. I'm thinking of running the requested command upon completion
of the backup so when the timer kicks in and turns the drive OFF it is
done so in a safe manner. Tnx!
--
Bob
--
Bob Felton
 
Archived from groups: microsoft.public.windowsxp.hardware (More info?)

For all possible DOS (or emulated DOS) commands under XP get the book
"Windows Command Line" ISBN 0-7356-2038-5 and see if what you want to do is
possible.

"Bob Felton" <rpf.removethis@usa.net> wrote in message
news:ma8qq0l2t3bipug955natp2kv5bcnttg89@4ax.com...
> By chance is there a command prompt command that can be run from a
> batch file that allows removing a connected USB device safely? I'm
> thinking of using a USB HDD for unattended backup. The drive will be
> connected via a USB cable but AC power to it will be turned ON and OFF
> via a timer function (so the drive doesn't spin when not in actual
> use). Manual testing of AC power ON and OFF seems to work OK but at
> times a message pops up saying the device was disconnected in an usafe
> manner. I'm thinking of running the requested command upon completion
> of the backup so when the timer kicks in and turns the drive OFF it is
> done so in a safe manner. Tnx!
> --
> Bob
> --
> Bob Felton
 
Archived from groups: microsoft.public.windowsxp.hardware (More info?)

Oops! I posted this to the wrong group. It should have gone into the
Windows 2000 group as I want to do this on a machine running Windows
2000 Server. Thanks for your responses. Are your comments still
applicable against Windows 2000 Server? Tnx!
--
Bob



On Tue, 30 Nov 2004 17:49:45 -0800, Bob Felton
<rpf.removethis@usa.net> wrote:

>By chance is there a command prompt command that can be run from a
>batch file that allows removing a connected USB device safely? I'm
>thinking of using a USB HDD for unattended backup. The drive will be
>connected via a USB cable but AC power to it will be turned ON and OFF
>via a timer function (so the drive doesn't spin when not in actual
>use). Manual testing of AC power ON and OFF seems to work OK but at
>times a message pops up saying the device was disconnected in an usafe
>manner. I'm thinking of running the requested command upon completion
>of the backup so when the timer kicks in and turns the drive OFF it is
>done so in a safe manner. Tnx!
>--
>Bob

--
Bob Felton
 
Archived from groups: microsoft.public.windowsxp.hardware (More info?)

"Bob Felton" <rpf.removethis@usa.net> wrote in message
news:ma8qq0l2t3bipug955natp2kv5bcnttg89@4ax.com...
> By chance is there a command prompt command that can be run from a
> batch file that allows removing a connected USB device safely? I'm
> thinking of using a USB HDD for unattended backup. The drive will be
> connected via a USB cable but AC power to it will be turned ON and OFF
> via a timer function (so the drive doesn't spin when not in actual
> use). Manual testing of AC power ON and OFF seems to work OK but at
> times a message pops up saying the device was disconnected in an usafe
> manner. I'm thinking of running the requested command upon completion
> of the backup so when the timer kicks in and turns the drive OFF it is
> done so in a safe manner. Tnx!
> --
> Bob
> --
> Bob Felton

The devcon utility can be used in a batch file to disable the device but
that may not be any better than cutting the power and it will need
administrator privileges to run.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q311272
 
Archived from groups: microsoft.public.windowsxp.hardware (More info?)

DOS is unlikely to be able to do this, but I'm constantly amazed what you
can do with "scripting". Have a look here:
http://www.microsoft.com/technet/scriptcenter/default.mspx

--
####################
## PH, London
####################
"Bob Felton" <rpf.removethis@usa.net> wrote in message
news:ma8qq0l2t3bipug955natp2kv5bcnttg89@4ax.com...
> By chance is there a command prompt command that can be run from a
> batch file that allows removing a connected USB device safely? I'm
> thinking of using a USB HDD for unattended backup. The drive will be
> connected via a USB cable but AC power to it will be turned ON and OFF
> via a timer function (so the drive doesn't spin when not in actual
> use). Manual testing of AC power ON and OFF seems to work OK but at
> times a message pops up saying the device was disconnected in an usafe
> manner. I'm thinking of running the requested command upon completion
> of the backup so when the timer kicks in and turns the drive OFF it is
> done so in a safe manner. Tnx!
> --
> Bob
> --
> Bob Felton
 
Archived from groups: microsoft.public.windowsxp.hardware (More info?)

Absolutely. MS has put a lot of effort into making machines (especially
servers) capable of being administered via scripts, and the buzzword is
"scripting". You write VB scripts, using an object model which gives you
access to elements of the OS, and wrap it up using "Windows Script Host".

--
####################
## PH, London
####################
"Bob Felton" <rpf.removethis@usa.net> wrote in message
news😛njsq05fauju6ofjuru5f4h3nrp54rk0r9@4ax.com...
> Oops! I posted this to the wrong group. It should have gone into the
> Windows 2000 group as I want to do this on a machine running Windows
> 2000 Server. Thanks for your responses. Are your comments still
> applicable against Windows 2000 Server? Tnx!
> --
> Bob
>
>
>
> On Tue, 30 Nov 2004 17:49:45 -0800, Bob Felton
> <rpf.removethis@usa.net> wrote:
>
>>By chance is there a command prompt command that can be run from a
>>batch file that allows removing a connected USB device safely? I'm
>>thinking of using a USB HDD for unattended backup. The drive will be
>>connected via a USB cable but AC power to it will be turned ON and OFF
>>via a timer function (so the drive doesn't spin when not in actual
>>use). Manual testing of AC power ON and OFF seems to work OK but at
>>times a message pops up saying the device was disconnected in an usafe
>>manner. I'm thinking of running the requested command upon completion
>>of the backup so when the timer kicks in and turns the drive OFF it is
>>done so in a safe manner. Tnx!
>>--
>>Bob
>
> --
> Bob Felton
 
Archived from groups: microsoft.public.windowsxp.hardware (More info?)

Thanks, Philip. I give scripting a looksee.



On Thu, 2 Dec 2004 20:51:24 -0000, "Philip Herlihy"
<foof8501@herlihy.eu.veil.com> wrote:

>Absolutely. MS has put a lot of effort into making machines (especially
>servers) capable of being administered via scripts, and the buzzword is
>"scripting". You write VB scripts, using an object model which gives you
>access to elements of the OS, and wrap it up using "Windows Script Host".

--
Bob Felton