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

Posted on 2006-07-07
Medium Priority
Last Modified: 2012-06-22
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?"
Question by:ES13Raven
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Expert Comment

by:Mark Skrodzki
ID: 17062430
Hi ES13Raven,

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


Author Comment

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

Author Comment

ID: 17062493
Found it:

echo y|chkdsk c: /f /r

Expert Comment

by:Mark Skrodzki
ID: 17062518

Great find!!!


Accepted Solution

Netminder earned 0 total points
ID: 17118305
Closed, 250 points refunded.
Site Admin

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month7 days, 19 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question