2 replies
by slcaughman Accepted solution
by scott_heath Accepted solution
use schtasks to schedule the tasks. chkdsk requires a reboot to run after setting the dirty bit on the drive.
Here is a bat file I used:
:: Delete All Tasks
schtasks /delete /tn * /f
:: Recreate Orginal Tasks with New Schedule and Run As System Account
schtasks /create /ru "System" /sc weekly /st 04:00:00 /tn "Reboot" /tr "shutdown -r -t 0"
schtasks /create /ru "System" /sc monthly /mo first /d mon /st 03:55:00 /tn "SetDirtyBit" /tr "fsutil dirty set c:"
schtasks /create /ru "System" /sc monthly /mo first /d mon /st 04:30:00 /tn "SetDefrag" /tr "c:\windows\system32\defrag.exe c: -f"
This discussion is closed to new replies.
Trending Networks posts
Sort by Trending