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?"