Automating ScanDisk and Disk Defragmenter with Task Scheduler

Last reviewed: January 14, 1998
Article ID: Q179306
The information in this article applies to:
  • Microsoft Internet Explorer versions 4.0, 4.01 for Windows 95
  • Microsoft Internet Explorer versions 4.0, 4.01 for Windows NT 4.0

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

  1. 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:

          ARTICLE-ID: Q178706
    
          TITLE     : How to Schedule a Program Using Task Scheduler
    
    

  2. In the Command Line box, type the following line

          <path> <drive>: /noninteractive /silent
    

    where <path> is the path to the Scandskw.exe file, and <drive> 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

  1. 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:

          ARTICLE-ID: Q178706
    
          TITLE     : How to Schedule a Program Using Task Scheduler
    
    

  2. In the Command Line box, type the following line

          <path> <drive>: /noprompt /q
    

    where <path> is the location of the Defrag.exe file, and <drive> 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
Keywords : kbtool msient msiew95
Version : WINDOWS:4.0,4.01
Platform : MS-DOS WINDOWS
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 14, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.