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

Posted on 2006-07-07
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Are you unable to synchronize your OST (Offline Storage Table) file with Microsoft Exchange Server? Is your OST file exceeding 2 GB size limit? In Microsoft Outlook 2002 and earlier versions, there is a 2 GB size limit for the OST file. If the file …
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

726 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