Running chkdsk from Scheduled task?

K

KG

I have been trying to schedule a chkdsk /F run on a XP sp2 home system, but it fails to run on the
next restart. The command in scheduled task is RUN "C:\WINDOWS\system32\chkdsk.exe /F C: D:".
If I run the task in scheduled task the screen just blinks and nothing runs at the next restart.
The chksdk /F runs fine through the "my computer/C: properties/tools/error checking/check now" will
schedule a chkdsk /F run upon the next restart as it should. Any ideas or suggestions???
*****************
Thank You (e-mail address removed)

To reply to this email please remove the AT
after the kGb in the reply to address as shown above.
 
P

Pegasus \(MVP\)

KG said:
I have been trying to schedule a chkdsk /F run on a XP sp2 home system, but it fails to run on the
next restart. The command in scheduled task is RUN
"C:\WINDOWS\system32\chkdsk.exe /F C: D:".
If I run the task in scheduled task the screen just blinks and nothing runs at the next restart.
The chksdk /F runs fine through the "my computer/C: properties/tools/error checking/check now" will
schedule a chkdsk /F run upon the next restart as it should. Any ideas or suggestions???
*****************
Thank You (e-mail address removed)

To reply to this email please remove the AT
after the kGb in the reply to address as shown above.

There are several severe problems with your command:
- There is no "RUN" command. Get rid of it!
- Get rid of the double quotes.
- You cannot run chkdsk against two drive letters.
- Chkdsk will prompt you for a Y/N answer. Unless
you pipe it into your command, chkdsk will wait forever
for your reply.

Your batch file should look like so:
@echo off
echo Y | C:\WINDOWS\system32\chkdsk.exe /F C:
echo Y | C:\WINDOWS\system32\chkdsk.exe /F D:

Why do you actually want to schedule chkdsk? Windows
knows by itself when it's time to do it!
 

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

Top