I am running Windows Vista and have been trying to figure out how to schedule the check disk program to run using Task Scheduler. So far, no luck in setting this up. Question now is ---- how wise is it to run Check disk and what frequency (daily, weekly or monthly) also is there a procedure for setting this up in the Vista version of task scheduler? The Vista version is so much different from XP that I tend to loose track of where I am at in the process. Any suggestions would be greatly appreciated. Many thanks.
Soldat,
There is no need to schedule defrag in Vista - It's already scheduled to run weekly (automagically)!
Type defrag in the start menu and open the defrag interface. Here you can run a manual defrag, but more importantly you can modify the schedule to better suit your usage (time of day, day of week, etc).
Weekly, which is default, is more than enough. After it has run once or twice it should just take a few moments each week, unless you change and add lots of files, to straighten out any fragmentation created in the previous 7 days.
Wow, I don't know how I messed that one up!
[quote:1rm543uv]how wise is it to run Check disk and what frequency (daily, weekly or monthly) [/quote:1rm543uv]
Hmmmmm, I usually don't run chkdsk unless there is a symptom of a drive issue, or a really hairy shutdown. That said, once a month wouldn't hurt. The problem is running chkdsk in a useful way requires a restart so the drive is not locked by the OS.
To automate chkdsk using the Task Scheduler in Vista do the following:
1. Type scheduler from the Start Menu and click Task Scheduler in the results
2. When the task scheduler opens click Create Task in the right column
3. A new windows opens. On the General tab type a name for the new task that is descriptive. Something along the lines of 'Monthly force chkdsk on reboot'. Check 'Run whether user is logged on or not' and 'Run with highest privileges'.
4. You can type a longer description in the description box, if you wish
5. On the Triggers tab click New. Here you can set the schedule that you wish the task to run
6. On the Actions tab click New. For Action you want "start a program'. Under Program/Script you want 'C:WindowsSystem32cmd.exe' (no quotes). Under Add Arguments you want '/c echo y|chkdsk c: /f /x' (no quotes). Click OK (this sets a chkdsk on next reboot).
7. Go back to the Actions tab. For Action you want "start a program'. Under Program/Script you want 'C:WindowsSystem32cmd.exe' (no quotes). Under Add Arguments you want 'shutdown -r -t 60' (no quotes). Click OK (this sets a restart in 60 seconds).
This will give you 2 actions. The first will set the chkdsk to run at next boot/reboot. The second will force a restart in 60 seconds. They have to be in that order.
8. On the Conditions tab you should (laptops and portables) ensure that the task will only run when on AC power
9. Click OK. You will be asked to enter your User Name and Password. User Name should be right. If you use no password just click OK.
Hopefully that is a little more useful that my earlier blathering!
Hey Soldat and Dave.
Dave - I know little about this (surprisingly!! but I did some checking on the net and the conventional wisdom there is it's not a great idea to run check disk regularly and frequently. Advice suggests that running check disk on a HDD with sector errors can possibly cause corruption of data. Because of this they also suggest backing up all important data prior to running check disk (each time). Does that make any sense to you??
Soldat - I don't know of anyone who includes running the check disk feature as part of their regular maintenance. As Dave said, most people just run it purely for diagnostics when the machine is already displaying symptoms, this is what it was specifically designed for....remedial rather than preventative.
cheers.....JIM
Oh, great guide too Dave...you da man!!
[quote="ozbloke":2u24adnq]Hey Soldat and Dave.
Dave - I know little about this (surprisingly!! but I did some checking on the net and the conventional wisdom there is it's not a great idea to run check disk regularly and frequently. Advice suggests that running check disk on a HDD with sector errors can possibly cause corruption of data. Because of this they also suggest backing up all important data prior to running check disk (each time). Does that make any sense to you??
[/quote:2u24adnq]
This is true. Usually check disk is ran because Windows noticed a read or write issue with the drive. Windows sets a registry key categorizing the drive as 'dirty'. This is what forces chkdsk to run at the next boot. If the drive was truly having issues writing or reading the drive then there is probably some corruption already. To what extent is anyone's guess, though. During chkdsk any bad sectors get marked as such. The data (if possible) is moved to a good area of the drive. If that is not possible the data is dumped into a file with a chk extension. The sector is marked as bad so it is not used again.
[quote:2u24adnq]Oh, great guide too Dave...you da man!![/quote:2u24adnq]
That's debatable!
Soldat,
If you're still monitoring this thread (sorry to everyone else from bringing up an old one)...
Server 2008, Vista, and Win7 have a new feature built into the NTFS filesystem called "self healing'. Basically the filesystem monitors files on the fly and attempts to correct corruption within Windows. I know it is enabled on Server 2008 and Win7, but I can't remember if it is on Vista. Here is a little more info about Self Healing on [url=http://technet.microsoft.com/en-us/library/cc771388%28WS.10%29.aspx:1yvmzpzb]TechNet[/url:1yvmzpzb]. Basically Self Healing is like an active Check Disk running in the background taking care of any corruption that occurs. Should something be corrupted to a point where the self healing function can not correct it then Windows will provide the standard "you should run Chkdsk" notification.
To see if Self Healing is enabled...
Open a command prompt with admin priveledges (start>type cmd>right click the cmd.exe result at the top>choose "Run as administrator"
type "cd.." (without quotes) twice. This will change the prompt from c:windowssystem32> to c:>
Type "FSUTIL Repair Query c:" (without quotes)
IF self healing is enables you will see the following:
[code:1yvmzpzb]Self healing is enabled for volume c: with flags 0x1.
flags: 0x01 - enable general repair
0x08 - warn about potential data loss
0x10 - disable general repair and bugcheck once on first corruption
C:>[/code:1yvmzpzb]
If it is not you can use the following commands to enable/disable self healing NTFS:
"FSUTIL Repair set C: 1" (without quotes) to enable
"FSUTIL Repair set C: 0" (without quotes) to disable
1 Guest(s)