0

I am struggling to find a way to automate chkdsk /f on all drives at startup, as so far I couldn't accomplish this task.

  1. Cannot use chkdsk in a batch file, as it would require user intervention (Y/N prompts in case of locked volumes).
  2. The "fsutil dirty set " method will not work completely, only the c: drive check will be executed at startup

Any idea?

Riccardo
  • 253
  • 1
  • 3
  • 13

1 Answers1

1
  1. I use this utility: chkdskall
  2. You can use chkdsk in a batch file by echoing the Y and piping it to chkdsk as follows:

    echo Y | chkdsk c: /f

James
  • 26
  • 4
  • 1) I have tried chkdskall utility, however at boot time it won't check all disks 2) Firstly, not all prompts are the same, (for example as for c: drive the only prompt will be about possibility to schedule a check at next boot. while on other locked drives the first prompt will ask to forcibly dismount the disk + a second prompt to schedule at next boot), secondly, locked disks will be checked at reboot, while unlocked units will be checked immediately. Unsuitable – Riccardo Apr 03 '15 at 15:19
  • Can you elaborate? Which drives does chkdskall not check? – James Apr 04 '15 at 02:42
  • When I run chkdskall I get something like this: Drive A:\ (Type Removable): No fixed drive, skipping. Drive C:\ (Type Fixed): Chkdsk successfully scheduled. Drive D:\ (Type CDRom): No fixed drive, skipping. Drive E:\ (Type Fixed): Chkdsk successfully scheduled. Drive F:\ (Type Fixed): Chkdsk successfully scheduled. Drive R:\ (Type Network): No fixed drive, skipping. – James Apr 04 '15 at 03:05
  • I get: C:\Program Files\Chkdskall>ChkdskAll.exe Drive C:\ (Type Fixed): Chkdsk successfully scheduled. Drive D:\ (Type CDRom): No fixed drive, skipping. Drive Q:\ (Type Fixed): Chkdsk for drive Q:\ is already scheduled. Drive S:\ (Type Fixed): Chkdsk for drive S:\ is already scheduled. Drive T:\ (Type Fixed): Chkdsk for drive T:\ is already scheduled. Drive W:\ (Type Fixed): Chkdsk successfully scheduled. However Q:,S: & T: won't run chkdsk at startup. Only C: & W: will do – Riccardo Apr 05 '15 at 17:11
  • Basically when launched it will schedule disk check for C: and that all other disks are already scheduled for check, however at boot only diks C: will be verified – Riccardo Jun 25 '15 at 12:40
  • ok sorry, I don't know why it isn't working for you – James Jul 07 '15 at 06:14