Solved

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

Posted on 2006-07-07
7
1,541 Views
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?"
0
Comment
Question by:ES13Raven
  • 2
  • 2
7 Comments
 
LVL 1

Expert Comment

by:Mark Skrodzki
ID: 17062430
Hi ES13Raven,

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

Cheers!
0
 

Author Comment

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

Author Comment

by:ES13Raven
ID: 17062493
Found it:

echo y|chkdsk c: /f /r
0
 
LVL 1

Expert Comment

by:Mark Skrodzki
ID: 17062518
ES13Raven,

Great find!!!

skrodzkim
0
 
LVL 5

Accepted Solution

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

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Seperate Windows 7 Purchases or Volume License... 13 199
password expiry Windows 6 145
Security cameras working but files saving are corrupt 4 148
active directory 5 60
Can you find a fax from a vendor you saved a decade ago in seconds? Have you ever cursed your PC under your breath during an audit because you couldn’t find the requested statement or driver history?  If you answered no to the first question or yes …
cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

823 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