how do I set a check disk with a script

  • Thread starter Thread starter J
  • Start date Start date
J

J

I want to have a wscript that sets the flag to run check disk at boot.

And then a scheduled task to run the script, probably weekly.

And then a scheduled task to reboot the computer.
(Using reboot.exe for this.)

Any one have an example script?
 
J said:
I want to have a wscript that sets the flag to run check disk at boot.

And then a scheduled task to run the script, probably weekly.

And then a scheduled task to reboot the computer.
(Using reboot.exe for this.)

Any one have an example script?

I use a batch file ( .bat ) with one line. In Notepad or any text editor:

echo y | chkdsk c: /f /r /x

Save as "Check_C.bat" . Use the quotes so it is saved as .bat and not .txt
 
Most excellent.

Thank you.

Phydeaux said:
I use a batch file ( .bat ) with one line. In Notepad or any text editor:

echo y | chkdsk c: /f /r /x

Save as "Check_C.bat" . Use the quotes so it is saved as .bat and not .txt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top