Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - How to wake-up drive

Reply
 
Old 09-03-2009   #1 (permalink)
J


 
 

How to wake-up drive

A semi-novice here.

I have a w-script that copies files to various computers on the network.

All works well except:
An external drive powers-off, and therefore takes about 20 seconds to
spin-up.
So, since the drive is "dead" the script skips this part.

I need a command to poke the drive awake.

Guidance please.

Jesse


My System SpecsSystem Spec
Old 09-03-2009   #2 (permalink)
Pegasus [MVP]


 
 

Re: How to wake-up drive


"J" <JFS@xxxxxx> wrote in message
news:ED3504EA-E1F0-4201-81A7-828B0C86B65D@xxxxxx
Quote:

>A semi-novice here.
>
> I have a w-script that copies files to various computers on the network.
>
> All works well except:
> An external drive powers-off, and therefore takes about 20 seconds to
> spin-up.
> So, since the drive is "dead" the script skips this part.
>
> I need a command to poke the drive awake.
>
> Guidance please.
>
> Jesse
>
Use an "on error resume next" statement to capture the error that is
generated while the disk is inaccessible, then loop until the error
disappears. If this is not clear, let's have a look at your code.


My System SpecsSystem Spec
Old 09-03-2009   #3 (permalink)
J


 
 

Re: How to wake-up drive

>
Quote:

> "J" <JFS@xxxxxx> wrote in message
> news:ED3504EA-E1F0-4201-81A7-828B0C86B65D@xxxxxx
Quote:

>>A semi-novice here.
>>
>> I have a w-script that copies files to various computers on the network.
>>
>> All works well except:
>> An external drive powers-off, and therefore takes about 20 seconds to
>> spin-up.
>> So, since the drive is "dead" the script skips this part.
>>
>> I need a command to poke the drive awake.
>>
>> Guidance please.
>>
>> Jesse
>>
>
> Use an "on error resume next" statement to capture the error that is
> generated while the disk is inaccessible, then loop until the error
> disappears. If this is not clear, let's have a look at your code.
>
Thank you for your response.

I place the "on error resume next" line at the beginning of the scripts to
prevent the scripts from exiting. I would rather some of the tasks be
accomplished than none.

The scripts are totally linear: no loops:
Create the backup folder with date and time
zip the identified folders and put them into the backup folder
copy the backup folder to a drive on another machine
some days, copy the folder to the external drive

J

My System SpecsSystem Spec
Old 09-03-2009   #4 (permalink)
Paul Randall


 
 

Re: How to wake-up drive


"J" <JFS@xxxxxx> wrote in message
news:B64CDBB2-7AB7-49E2-B24D-D172FD044AF0@xxxxxx
Quote:
Quote:

> >
>> "J" <JFS@xxxxxx> wrote in message
>> news:ED3504EA-E1F0-4201-81A7-828B0C86B65D@xxxxxx
Quote:

>>>A semi-novice here.
>>>
>>> I have a w-script that copies files to various computers on the network.
>>>
>>> All works well except:
>>> An external drive powers-off, and therefore takes about 20 seconds to
>>> spin-up.
>>> So, since the drive is "dead" the script skips this part.
>>>
>>> I need a command to poke the drive awake.
>>>
>>> Guidance please.
>>>
>>> Jesse
>>>
>>
>> Use an "on error resume next" statement to capture the error that is
>> generated while the disk is inaccessible, then loop until the error
>> disappears. If this is not clear, let's have a look at your code.
>>
>
> Thank you for your response.
>
> I place the "on error resume next" line at the beginning of the scripts to
> prevent the scripts from exiting. I would rather some of the tasks be
> accomplished than none.
>
> The scripts are totally linear: no loops:
> Create the backup folder with date and time
> zip the identified folders and put them into the backup folder
> copy the backup folder to a drive on another machine
> some days, copy the folder to the external drive
Does the script use any branching logic (for example, 'If' and 'Select Case'
statements)?
Does the script invoke any functions or subroutines?

If the answer to either of the two questions is yes, then your 'on error
resume next' line at the beginning of the script really means :
1) Do not report any errors.
2) For some errors, change the order in which statements are executed,
depending on where errors occur.
The net result is that when the script ends, it may be difficult or
impossible to know what statements were actually executed and which ones
were not, or which statements that logically should not have been executed,
actually were executed because of an error.

Paul Randall


My System SpecsSystem Spec
Old 09-04-2009   #5 (permalink)
Pegasus [MVP]


 
 

Re: How to wake-up drive


"J" <JFS@xxxxxx> wrote in message
news:B64CDBB2-7AB7-49E2-B24D-D172FD044AF0@xxxxxx
Quote:
Quote:

> >
>> "J" <JFS@xxxxxx> wrote in message
>> news:ED3504EA-E1F0-4201-81A7-828B0C86B65D@xxxxxx
Quote:

>>>A semi-novice here.
>>>
>>> I have a w-script that copies files to various computers on the network.
>>>
>>> All works well except:
>>> An external drive powers-off, and therefore takes about 20 seconds to
>>> spin-up.
>>> So, since the drive is "dead" the script skips this part.
>>>
>>> I need a command to poke the drive awake.
>>>
>>> Guidance please.
>>>
>>> Jesse
>>>
>>
>> Use an "on error resume next" statement to capture the error that is
>> generated while the disk is inaccessible, then loop until the error
>> disappears. If this is not clear, let's have a look at your code.
>>
>
> Thank you for your response.
>
> I place the "on error resume next" line at the beginning of the scripts to
> prevent the scripts from exiting. I would rather some of the tasks be
> accomplished than none.
>
> The scripts are totally linear: no loops:
> Create the backup folder with date and time
> zip the identified folders and put them into the backup folder
> copy the backup folder to a drive on another machine
> some days, copy the folder to the external drive
>
> J
Placing the "on error resume next" statement at the beginning of your code
is not a good idea. It can make debugging extremely difficult. As I said
before, if you post your code here then someone will show you how to create
a loop to deal with your issue.


My System SpecsSystem Spec
Old 09-07-2009   #6 (permalink)
J


 
 

Re: How to wake-up drive


"Pegasus [MVP]" <news@xxxxxx> wrote in message
news:%23ywwoXSLKHA.2404@xxxxxx
Quote:

>
> "J" <JFS@xxxxxx> wrote in message
> news:B64CDBB2-7AB7-49E2-B24D-D172FD044AF0@xxxxxx
Quote:
Quote:

>> >
>>> "J" <JFS@xxxxxx> wrote in message
>>> news:ED3504EA-E1F0-4201-81A7-828B0C86B65D@xxxxxx
>>>>A semi-novice here.
>>>>
>>>> I have a w-script that copies files to various computers on the
>>>> network.
>>>>
>>>> All works well except:
>>>> An external drive powers-off, and therefore takes about 20 seconds to
>>>> spin-up.
>>>> So, since the drive is "dead" the script skips this part.
>>>>
>>>> I need a command to poke the drive awake.
>>>>
>>>> Guidance please.
>>>>
>>>> Jesse
>>>>
>>>
>>> Use an "on error resume next" statement to capture the error that is
>>> generated while the disk is inaccessible, then loop until the error
>>> disappears. If this is not clear, let's have a look at your code.
>>>
>>
>> Thank you for your response.
>>
>> I place the "on error resume next" line at the beginning of the scripts
>> to prevent the scripts from exiting. I would rather some of the tasks be
>> accomplished than none.
>>
>> The scripts are totally linear: no loops:
>> Create the backup folder with date and time
>> zip the identified folders and put them into the backup folder
>> copy the backup folder to a drive on another machine
>> some days, copy the folder to the external drive
>>
>> J
>
> Placing the "on error resume next" statement at the beginning of your code
> is not a good idea. It can make debugging extremely difficult. As I said
> before, if you post your code here then someone will show you how to
> create a loop to deal with your issue.
>
Thank you for your comments.

The purpose of placing the statement at the beginning is so no errors are
reported to the users.

These scripts run on more than a dozen computers.

During verifying, I commented the line when verifying the subsequent steps.

The scripts work fine except when the external disk has spun-down.

So, is there a simple way to "poke" the disk awake?

My System SpecsSystem Spec
Old 09-07-2009   #7 (permalink)
J


 
 

Re: How to wake-up drive


"Paul Randall" <Paulr901@xxxxxx> wrote in message
news:uyh%23V5QLKHA.1248@xxxxxx
Quote:

>
> "J" <JFS@xxxxxx> wrote in message
> news:B64CDBB2-7AB7-49E2-B24D-D172FD044AF0@xxxxxx
Quote:
Quote:

>> >
>>> "J" <JFS@xxxxxx> wrote in message
>>> news:ED3504EA-E1F0-4201-81A7-828B0C86B65D@xxxxxx
>>>>A semi-novice here.
>>>>
>>>> I have a w-script that copies files to various computers on the
>>>> network.
>>>>
>>>> All works well except:
>>>> An external drive powers-off, and therefore takes about 20 seconds to
>>>> spin-up.
>>>> So, since the drive is "dead" the script skips this part.
>>>>
>>>> I need a command to poke the drive awake.
>>>>
>>>> Guidance please.
>>>>
>>>> Jesse
>>>>
>>>
>>> Use an "on error resume next" statement to capture the error that is
>>> generated while the disk is inaccessible, then loop until the error
>>> disappears. If this is not clear, let's have a look at your code.
>>>
>>
>> Thank you for your response.
>>
>> I place the "on error resume next" line at the beginning of the scripts
>> to prevent the scripts from exiting. I would rather some of the tasks be
>> accomplished than none.
>>
>> The scripts are totally linear: no loops:
>> Create the backup folder with date and time
>> zip the identified folders and put them into the backup folder
>> copy the backup folder to a drive on another machine
>> some days, copy the folder to the external drive
>
> Does the script use any branching logic (for example, 'If' and 'Select
> Case' statements)?
> Does the script invoke any functions or subroutines?
>
> If the answer to either of the two questions is yes, then your 'on error
> resume next' line at the beginning of the script really means :
> 1) Do not report any errors.
> 2) For some errors, change the order in which statements are executed,
> depending on where errors occur.
> The net result is that when the script ends, it may be difficult or
> impossible to know what statements were actually executed and which ones
> were not, or which statements that logically should not have been
> executed, actually were executed because of an error.
>
> Paul Randall
>
Thank you for your response.

No loops, straight through and simple..

The purpose of placing the statement at the beginning is so no errors are
reported to the users.

These scripts run on more than a dozen computers.

I commented the line when verifying the subsequent steps.

The scripts work fine except when the external disk has spun-down.

So, is there a simple way to "poke" the disk awake?

My System SpecsSystem Spec
Old 09-07-2009   #8 (permalink)
Pegasus [MVP]


 
 

Re: How to wake-up drive


"J" <JFS@xxxxxx> wrote in message
news:51DE1CD7-6155-4418-A996-8B48E1B9F67C@xxxxxx
Quote:

>
> "Pegasus [MVP]" <news@xxxxxx> wrote in message
> news:%23ywwoXSLKHA.2404@xxxxxx
Quote:

>>
>> "J" <JFS@xxxxxx> wrote in message
>> news:B64CDBB2-7AB7-49E2-B24D-D172FD044AF0@xxxxxx
Quote:

>>> >
>>>> "J" <JFS@xxxxxx> wrote in message
>>>> news:ED3504EA-E1F0-4201-81A7-828B0C86B65D@xxxxxx
>>>>>A semi-novice here.
>>>>>
>>>>> I have a w-script that copies files to various computers on the
>>>>> network.
>>>>>
>>>>> All works well except:
>>>>> An external drive powers-off, and therefore takes about 20 seconds to
>>>>> spin-up.
>>>>> So, since the drive is "dead" the script skips this part.
>>>>>
>>>>> I need a command to poke the drive awake.
>>>>>
>>>>> Guidance please.
>>>>>
>>>>> Jesse
>>>>>
>>>>
>>>> Use an "on error resume next" statement to capture the error that is
>>>> generated while the disk is inaccessible, then loop until the error
>>>> disappears. If this is not clear, let's have a look at your code.
>>>>
>>>
>>> Thank you for your response.
>>>
>>> I place the "on error resume next" line at the beginning of the scripts
>>> to prevent the scripts from exiting. I would rather some of the tasks be
>>> accomplished than none.
>>>
>>> The scripts are totally linear: no loops:
>>> Create the backup folder with date and time
>>> zip the identified folders and put them into the backup folder
>>> copy the backup folder to a drive on another machine
>>> some days, copy the folder to the external drive
>>>
>>> J
>>
>> Placing the "on error resume next" statement at the beginning of your
>> code is not a good idea. It can make debugging extremely difficult. As I
>> said before, if you post your code here then someone will show you how to
>> create a loop to deal with your issue.
>>
>
> Thank you for your comments.
>
> The purpose of placing the statement at the beginning is so no errors are
> reported to the users.
>
> These scripts run on more than a dozen computers.
>
> During verifying, I commented the line when verifying the subsequent
> steps.
>
> The scripts work fine except when the external disk has spun-down.
>
> So, is there a simple way to "poke" the disk awake?
Yes, there is but unless you post your code there is no point in me making
specific suggestions. It would be equivalent to guessing and I don't want to
guess when it comes to coding.


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
DVD/CD drive disappearing from Vista x64 on wake up Vista General
wake up Vista performance & maintenance
SATA hard drive won't wake up Vista hardware & devices
Wake up! Vista General
How to prevent Ready Boost drive from appearing after "wake up"? Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46