I currently have a virus scan, defragment, and backup scheduled to run in Windows XP every night while I sleep.
I'd like to add an automatic Check Disk to that list. It must be possible, but how?
Printable View
I currently have a virus scan, defragment, and backup scheduled to run in Windows XP every night while I sleep.
I'd like to add an automatic Check Disk to that list. It must be possible, but how?
In win98 System tools folder in the start menu there is a thing called maintenance wizard that you can use to do that. Don't know if XP has it tho.:confused:
I'm pretty sure you can't autoset CheckDisk in Windows XP. Anyways, you have to reboot to CheckDisk for some reason.
You can ust the AT command to schedule a job that has chkdsk in it for all but the system volume. The issue is that to chkdsk /f the system volume, you must do it during the boot process before the OS is fully loaded.
I imagine that you can include a call to a "shutdown/restart" utility but I wouldn't recommend it. It would be much easier to tell the system to run chkdsk every time you boot it. It is an option in Diskeeper.
Taking into account my backup shuts down, runs, then restarts the machine in its course of duties, I suppose it would be possible to run Check Disk and let the backup program restart the machine. Check Disk should then run when the backup is finished.
When I run chkdsk /f, I am prompted for input. If I could circumvent this prompt I could schedule a scan just as I have scheduled a defragment.
How would I go about this?
I want to scan only my system volume and can't really afford Diskeeper.
The /X option will force a volume to be dismounted - if that is the prompt you are getting. If you are using Diskeeper, just tell it to run at boot time with a chkdsk before the defrag. That's how I do it.
When running chkdsk (I don't have Diskeeper) I get prompted that I cannot run a scan on a system volume unless I schedule it for the next restart. Can I get around this prompt without user input?
I don't know. I've always used Diskeeper. I'll check my registry tomorrow. If I find anything I'll post it.
I managed to fiddle a solution.
I created a .bat file reading:
echo y | chkdsk c: /f
shutdown /r /t 00
The first line schedules a disk check without answering a prompt, and the second is to reboot and run the disk check.
This was scheduled with Task Scheduler.
I now have automatic virus scans, disk checks, defragmentation and daily and weekly backups.
My computer does more when I sleep then it does when I am awake!
I just came across this batch file command that does it all.
Code:>help chkntfs
Displays or modifies the checking of disk at boot time.
CHKNTFS volume [...]
CHKNTFS /D
CHKNTFS /T[:time]
CHKNTFS /X volume [...]
CHKNTFS /C volume [...]
volume Specifies the drive letter (followed by a colon),
mount point, or volume name.
/D Restores the machine to the default behavior; all drives are
checked at boot time and chkdsk is run on those that are
dirty.
/T:time Changes the AUTOCHK initiation count down time to the
specified amount of time in seconds. If time is not
specified, displays the current setting.
/X Excludes a drive from the default boot-time check. Excluded
drives are not accumulated between command invocations.
/C Schedules a drive to be checked at boot time; chkdsk will run
if the drive is dirty.
If no switches are specified, CHKNTFS will display if the specified drive is
dirty or scheduled to be checked on next reboot.
>