Microsoft KB Archive/179306

= How to Automate ScanDisk and Disk Defragmenter Using Task Scheduler Tool =

Article ID: 179306

Article Last Modified on 1/22/2007

-

APPLIES TO


 * Microsoft Internet Explorer 1.0
 * Microsoft Internet Explorer 2.0
 * Microsoft Internet Explorer 3.0
 * Microsoft Internet Explorer 3.01
 * Microsoft Internet Explorer 3.02
 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Internet Explorer 4.01 128-Bit Edition
 * Microsoft Internet Explorer 5.0
 * Microsoft Internet Explorer 5.01
 * Microsoft Internet Explorer 5.5
 * Microsoft Internet Explorer 3.2
 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Internet Explorer 2.0
 * Microsoft Internet Explorer 3.0
 * Microsoft Internet Explorer 3.01
 * Microsoft Internet Explorer 3.02
 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Internet Explorer 4.01 128-Bit Edition
 * Microsoft Internet Explorer 5.0
 * Microsoft Internet Explorer 5.01
 * Microsoft Internet Explorer 5.5
 * Microsoft Windows 98 Standard Edition
 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Internet Explorer 4.01 128-Bit Edition
 * Microsoft Internet Explorer 5.0
 * Microsoft Internet Explorer 5.01

-



This article was previously published under Q179306



SUMMARY
This article describes how to configure ScanDisk and Disk Defragmenter to run without user intervention using the Task Scheduler tool.



MORE INFORMATION
To configure ScanDisk and Disk Defragmenter to run without user intervention, you can add command-line switches to the properties of a scheduled task. To do so, use the appropriate method:

Configure ScanDisk
 To configure ScanDisk, double-click My Computer, double-click Scheduled Tasks, and then double-click ScanDisk.

NOTE: If ScanDisk is not listed as a scheduled task, see the following article in the Microsoft Knowledge Base for information about how to add a scheduled task:

178706 How to Schedule a Program Using Task Scheduler

 In the Command Line box, type the following line



where is the path to the Scandskw.exe file, and is the letter of the drive you want to scan. ScanDisk runs without user prompts if you use the /noninteractive parameter (switch). The /silent switch removes the summary screen.

For example, you could type the following line:

c:\windows\scandskw.exe c: /noninteractive /silent



Configure Disk Defragmenter
 To configure Disk Defragmenter, double-click My Computer, double-click Scheduled Tasks, double-click Disk Defragmenter.

NOTE: If Disk Defragmenter is not listed as a scheduled task, see the following article in the Microsoft Knowledge Base for information about how to add a scheduled task:

178706 How to Schedule a Program Using Task Scheduler

 In the Command Line box, type the following line



where is the location of the Defrag.exe file, and is the letter of the drive you want to defragment. Disk Defragmenter runs without user prompts if you use the /noprompt switch. The /q switch defragments only the files.

For example, you could type the following line:

c:\windows\defrag.exe c: /noprompt /q



Additional query words: 4.00 5.00

Keywords: kbhowto KB179306

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.