From: someone watching on
I researched this on google and found nothing. There's plenty on how to check a specific volume but found nothing on checking ALL local drives at boot.

It appears chkdsk has no command line switch for /all drives or a parameter file (like earlier versions). Anyone know how to do it?
Thanks
From: Billns on
On 5/2/2010 5:02 AM, someone watching wrote:
> I researched this on google and found nothing. There's plenty on how to
> check a specific volume but found nothing on checking ALL local drives
> at boot.
> It appears chkdsk has no command line switch for /all drives or a
> parameter file (like earlier versions). Anyone know how to do it?
> Thanks

You could create a batch file that runs at startup:

chkdsk c:
chkdsk d:
chkdsk e:
etc.

Why you would want to do this at every startup is beyond me. I seldom
have the need to run chkdsk.

Bill

From: someone watching on
"Billns" <billns(a)nsverizon.net> wrote in message
news:%23dLUDDj6KHA.3184(a)TK2MSFTNGP05.phx.gbl...
> On 5/2/2010 5:02 AM, someone watching wrote:
>> I researched this on google and found nothing. There's plenty on how to
>> check a specific volume but found nothing on checking ALL local drives
>> at boot.
>> It appears chkdsk has no command line switch for /all drives or a
>> parameter file (like earlier versions). Anyone know how to do it?
>> Thanks
>
> You could create a batch file that runs at startup:

That's an idea, but where do I place the bat (or CMD?) file and where does
the command line go to execute it before GUI?

BTW, don't want to do this every time but occasionally, especially for
surface scan feature.


From: LD5SZRA on

ChkDsk is not something you want to run every time you boot your
system because it slows down everything and frustration builds up
resulting in people smashing their computers.

Oh, by the way don't listen to Twayne because he is, what Pig-Bear
says, a "known troll" around here!

hth


> someone watching wrote:
>
> I researched this on google and found nothing. There's plenty on
> how to check a specific volume but found nothing on checking ALL
> local drives at boot.
>
> It appears chkdsk has no command line switch for /all drives or
> a parameter file (like earlier versions). Anyone know how to do
> it?
> Thanks

--
THE INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND. LD5SZRA DISCLAIMS ALL WARRANTIES, EITHER EXPRESSED OR
IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL LD5SZRA
OR ITS ASSOCIATES BE LIABLE FOR ANY DAMAGES WHATSOEVER
INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF
BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF LD5SZRA OR ITS
ASSOCIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR
LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL
DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright LD5SZRA 2010.
From: John John - MVP on
someone watching wrote:
> "Billns" <billns(a)nsverizon.net> wrote in message
> news:%23dLUDDj6KHA.3184(a)TK2MSFTNGP05.phx.gbl...
>> On 5/2/2010 5:02 AM, someone watching wrote:
>>> I researched this on google and found nothing. There's plenty on how to
>>> check a specific volume but found nothing on checking ALL local drives
>>> at boot.
>>> It appears chkdsk has no command line switch for /all drives or a
>>> parameter file (like earlier versions). Anyone know how to do it?
>>> Thanks
>> You could create a batch file that runs at startup:
>
> That's an idea, but where do I place the bat (or CMD?) file and where does
> the command line go to execute it before GUI?
>
> BTW, don't want to do this every time but occasionally, especially for
> surface scan feature.

From the onset it should be noted that the startup disk check tool is
Autochk.exe, this native NT application is designed to check the disk
without the support of the Win32 subsystem, otherwise it does the same
thing as Chkdsk. There are two ways to have Chkdsk run when the
computer starts, Autochk will run if you schedule it to run or by
default it will run if the volume's dirty bit is set. If the operating
system detects problems it will automatically set the dirty bit and the
volume will be checked at the next startup. The dirty bit can also be
set manually but it is best not to do this and to leave the setting of
the dirty bit to the operating system because once set the dirty bit
cannot be changed and while the boot time check can be skipped it cannot
be canceled. On the other hand, a scheduled Chkdsk without the dirty
bit can be canceled at any time.

If you still want to use the "dirty bit" method just create a batch file
that will use the fsutil command to set the dirty bit on the volumes,
use a line for each of the volumes, for example to set the dirty bit on
volumes C, E, F & G:

====================================
fsutil dirty set C:
fsutil dirty set E:
fsutil dirty set F:
fsutil dirty set G:

====================================

Anytime you run the batch file the dirty bit will be set and chkdsk will
run against the volumes when Windows is rebooted. As noted earlier,
once set the dirty bit cannot be removed and while you can skip the
chkdsk it cannot be canceled, you have to let ckkdsk run to remove the
dirty bit.



Manually scheduled Check Disks are recorded at the BootExecute value at:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager

These schedule disk checks can be canceled by simply returning the
BootExecute value to its default value, this can be done with the
Chkntfs command:

chkntfs /d


To manually schedule a Chkdsk at the next reboot:

First run the chkntfs /d command to set the BootExecute value to its
defaults, then:


On the Windows volume, assumes the volume is C:

At the command prompt issue:

chkdsk c: /f

Chkdsk will return a message telling you that it cannot lock or dismount
the volume and ask you if you want to schedule a Chkdsk at the next
restart, answer Yes.

For dismountable data volumes, for example, volume D:

Open a file on the volume, or explore the volume with Explorer. Then at
the Command prompt issue:

chkdsk d: /f

Chkdsk will inform you that the volume is being used by another process
and it will ask you if you want to force a dismount on the volume,
answer No. Chkdsk will then ask you if you want to schedule a Chkdsk at
the next restart, answer Yes.

Do the same for the other drives that you want checked at boot time,
open a file on the volume and run the chkdsk command against the volume
and have it schedule a boot time disk check.

Now the drives are scheduled to run at the next restart. To do this in
a semi-automated manner, after doing the above:

Using Regedit export the
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager] key.

This exported file will be fairly large, edit the saved file and
remove/delete everything except the BootExecute value, the edited file
will look like this:

==========================================================
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
"BootExecute"=hex(7):61,00,75,00,74,00,6f,00,63,00,68,00,65,00,63,00,6b,00,20,
......... with a long series of numbers.

=====================================================

(Leave a blank line at the end of the file.) You only want to save the
BootExecute value, nothing else!

Save the edited .reg file and when you want to schedule the Chkdsk merge
it to the registry.

To reset the BootExecute value and cancel all scheduled Chkdsk at the
command prompt issue:

chkntfs /d

John