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?"
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?"
ASKER
Yes, you get an "invalid parameter - /y" so it doesn't work
ASKER
Found it:
echo y|chkdsk c: /f /r
echo y|chkdsk c: /f /r
ES13Raven,
Great find!!!
skrodzkim
Great find!!!
skrodzkim
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you tried, "chkdsk c: /f/r/y" in your bat file?
Cheers!