At work we have several pc's that use windows 2000 professional for vision
systems, and for some reason when we have to shut down our sub-stations
invertently one of our pc's gets the bsod and upon restarting the pc's say
that the system file is corrupt. We have about 100 pc's and it wouldn't be
very possible to physically go around and shut off all the pc's as this
would require too much manpower and it would be less expensive to just
replace the pc and replace the hard drive and ghost the new one for later
use.

Is it possible to write a script to scan the hard drives while the pc still
runs normally so we could first prevent the problem and hopefully mark the
bad sectors as bad as to possibly prolong the life of the drives, and also
to let us know that we need to put it on a schedule to change out the drive.
Also if shutting down the pc's in this manner, (Shutting Power Off) maybe
make a script that would automatically shut down all the pc's.

I have never used vbscript but I've heard that such scripting is possible
using it.

Dave Marden

Re: Windows 2000 bsod script to prevent or detect bad hard drive by Dave

Dave
Mon Sep 03 10:18:05 PDT 2007

Your problem is more than likely write caching is enabled hence the registry
hive file is not up-to-date when the plug is pulled.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Dave Marden" wrote:
> At work we have several pc's that use windows 2000 professional for vision
> systems, and for some reason when we have to shut down our sub-stations
> invertently one of our pc's gets the bsod and upon restarting the pc's say
> that the system file is corrupt. We have about 100 pc's and it wouldn't
> be very possible to physically go around and shut off all the pc's as this
> would require too much manpower and it would be less expensive to just
> replace the pc and replace the hard drive and ghost the new one for later
> use.
>
> Is it possible to write a script to scan the hard drives while the pc
> still runs normally so we could first prevent the problem and hopefully
> mark the bad sectors as bad as to possibly prolong the life of the drives,
> and also to let us know that we need to put it on a schedule to change out
> the drive. Also if shutting down the pc's in this manner, (Shutting Power
> Off) maybe make a script that would automatically shut down all the pc's.
>
> I have never used vbscript but I've heard that such scripting is possible
> using it.
>
> Dave Marden
>


Re: Windows 2000 bsod script to prevent or detect bad hard drive by Al

Al
Tue Sep 04 22:03:43 PDT 2007


"Dave Marden" <newsgroup@mardenfamily.com> wrote in message
news:uk9oqLk7HHA.4660@TK2MSFTNGP02.phx.gbl...
> At work we have several pc's that use windows 2000 professional for vision
> systems, and for some reason when we have to shut down our sub-stations
> invertently one of our pc's gets the bsod and upon restarting the pc's say
> that the system file is corrupt. We have about 100 pc's and it wouldn't
> be very possible to physically go around and shut off all the pc's as this
> would require too much manpower and it would be less expensive to just
> replace the pc and replace the hard drive and ghost the new one for later
> use.
>
> Is it possible to write a script to scan the hard drives while the pc
> still runs normally so we could first prevent the problem and hopefully
> mark the bad sectors as bad as to possibly prolong the life of the drives,
> and also to let us know that we need to put it on a schedule to change out
> the drive. Also if shutting down the pc's in this manner, (Shutting Power
> Off) maybe make a script that would automatically shut down all the pc's.
>
> I have never used vbscript but I've heard that such scripting is possible
> using it.

"system file is corrupt" and "disk contains bad sectors" are two distinctly
different conditions. Certainly a bad sector within the system file might
result in the "corrupt" message, but the corrupt message itself does not
mean that there are bad sectors - just that the content of the file is in an
invalid and unrecoverable state.

In our XP/w2k3 we use the remote shutdown feature of the shutdown command,
i.e.:

shutdown -s -m \\computer01 -f
shutdown -s -m \\computer02 -f

I'm not sure if this is available in w2k, but, if so, you could list all the
targetted workstations in a file and shut each down in turn with something
like:

for /f %%C in (computerlist.txt) do shutdown -s -m %%C -f

If a large number of systems is involved, this could take a while,
especially if many of them are already powered off. To see which are on your
batch script could check the output of the "net view" command, and skip the
shutdown if the computer is not listed. Or you could add a delay after the
for loop and then run the 'net view' command so the operator could decide if
further steps need be taken before shutting down the power.

Not a vbscript solution, of course, but possibly a simpler one.

/Al



Re: Windows 2000 bsod script to prevent or detect bad hard drive by Dave

Dave
Wed Sep 05 12:42:55 PDT 2007

Thanks I'll give this a try tomorrow.

Dave Marden


"Al Dunbar" <AlanDrub@hotmail.com.nospaam> wrote in message
news:%23bu1z937HHA.1212@TK2MSFTNGP05.phx.gbl...
>
> "Dave Marden" <newsgroup@mardenfamily.com> wrote in message
> news:uk9oqLk7HHA.4660@TK2MSFTNGP02.phx.gbl...
>> At work we have several pc's that use windows 2000 professional for
>> vision systems, and for some reason when we have to shut down our
>> sub-stations invertently one of our pc's gets the bsod and upon
>> restarting the pc's say that the system file is corrupt. We have about
>> 100 pc's and it wouldn't be very possible to physically go around and
>> shut off all the pc's as this would require too much manpower and it
>> would be less expensive to just replace the pc and replace the hard drive
>> and ghost the new one for later use.
>>
>> Is it possible to write a script to scan the hard drives while the pc
>> still runs normally so we could first prevent the problem and hopefully
>> mark the bad sectors as bad as to possibly prolong the life of the
>> drives, and also to let us know that we need to put it on a schedule to
>> change out the drive. Also if shutting down the pc's in this manner,
>> (Shutting Power Off) maybe make a script that would automatically shut
>> down all the pc's.
>>
>> I have never used vbscript but I've heard that such scripting is possible
>> using it.
>
> "system file is corrupt" and "disk contains bad sectors" are two
> distinctly different conditions. Certainly a bad sector within the system
> file might result in the "corrupt" message, but the corrupt message itself
> does not mean that there are bad sectors - just that the content of the
> file is in an invalid and unrecoverable state.
>
> In our XP/w2k3 we use the remote shutdown feature of the shutdown command,
> i.e.:
>
> shutdown -s -m \\computer01 -f
> shutdown -s -m \\computer02 -f
>
> I'm not sure if this is available in w2k, but, if so, you could list all
> the targetted workstations in a file and shut each down in turn with
> something like:
>
> for /f %%C in (computerlist.txt) do shutdown -s -m %%C -f
>
> If a large number of systems is involved, this could take a while,
> especially if many of them are already powered off. To see which are on
> your batch script could check the output of the "net view" command, and
> skip the shutdown if the computer is not listed. Or you could add a delay
> after the for loop and then run the 'net view' command so the operator
> could decide if further steps need be taken before shutting down the
> power.
>
> Not a vbscript solution, of course, but possibly a simpler one.
>
> /Al
>
>