PC Review


Reply
Thread Tools Rate Thread

Command Prompt Command to:

 
 
Bob Felton
Guest
Posts: n/a
 
      1st Dec 2004
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
 
Reply With Quote
 
 
 
 
Jerry
Guest
Posts: n/a
 
      1st Dec 2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
John Coode
Guest
Posts: n/a
 
      1st Dec 2004

"Bob Felton" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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...;EN-US;Q311272


 
Reply With Quote
 
Philip Herlihy
Guest
Posts: n/a
 
      1st Dec 2004
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/scr...r/default.mspx

--
####################
## PH, London
####################
"Bob Felton" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
Bob Felton
Guest
Posts: n/a
 
      1st Dec 2004
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
<(E-Mail Removed)> 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
 
Reply With Quote
 
Philip Herlihy
Guest
Posts: n/a
 
      2nd Dec 2004
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" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> 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
> <(E-Mail Removed)> 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



 
Reply With Quote
 
Bob Felton
Guest
Posts: n/a
 
      3rd Dec 2004
Thanks, Philip. I give scripting a looksee.



On Thu, 2 Dec 2004 20:51:24 -0000, "Philip Herlihy"
<(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command prompt tool to minimize a command window AFTER it starts? Herb Martin Microsoft Windows 2000 CMD Promt 4 9th Apr 2009 09:52 PM
command line prompt showing how long last command took? sillyhat@yahoo.com Microsoft Windows 2000 CMD Promt 13 31st May 2006 04:18 PM
command line prompt showing how long last command took? sillyhat@yahoo.com Windows XP General 1 13th May 2006 02:03 AM
How can I execute a command in the command prompt using Visual Bas =?Utf-8?B?RWR1YXJkbzc4?= Microsoft Dot NET 0 16th Jan 2005 05:41 AM
Permission Denied while running cscript command in command prompt Eric Microsoft Windows 2000 CMD Promt 0 3rd Oct 2003 08:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:57 PM.