Link to home
Start Free TrialLog in
Avatar of ES13Raven
ES13Raven

asked on

Need to setup CHKDSK /f /r as a scheduled task

In my company's network, I have all 120 of my XP Workstations on a weekly reboot and defrag schedule using scheduled tasks.  I have this pushed out through a Group Policy login script that runs a batch file which creates the scheduled tasks and runs them under the System account.  It has been working well.

I would like to add Chkdsk to this automatic weekly maintenance as well.

Is there a way I can run a .bat file that will run "chkdsk c: /f /r" AND confirm yes to run it upon reboot when it asks:  "Chkdsk cannot run because the volume is in use by another precess. Would you like to schedule this volume to be checked the next time the system restarts?"
Avatar of Mark Skrodzki
Mark Skrodzki
Flag of United States of America image

Hi ES13Raven,

Have you tried, "chkdsk c: /f/r/y" in your bat file?

Cheers!
Avatar of ES13Raven
ES13Raven

ASKER

Yes, you get an "invalid parameter - /y" so it doesn't work
Found it:

echo y|chkdsk c: /f /r
ES13Raven,

Great find!!!

skrodzkim
ASKER CERTIFIED SOLUTION
Avatar of Netminder
Netminder

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial