Clear, practical technology insights About · Contact

How to Run Windows XP System Maintenance With Automated Scripts

A computer needs a few things done to it on a regular basis to ensure that it continues running smoothly. This guide will show you how to set your Windows XP computer to automatically take care of it self using the task scheduler and batch...

Author: Lesley Montoya5 minutes read
Table of Contents
Method 1 of 5:

Disk Cleanup First Phase

Disk Cleanup - Windows bundled tool that performs Disk Space Cleanup of no longer needed files. To run this task you will need Administrative privileges

  1. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click on "Start" Menu.
  2. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click on "Run"
  3. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Type "CMD" in the run box; Press Enter. This will bring up the DOS Prompt Window.
  4. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Type "CLEANMGR /sageset:n"; Press Enter. where n is an arbitrary number from 0 through 65535.
  5. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Check the boxes of the files you wish to clean up.
    1. A window will appear similar to the screen shot] - What you are doing is telling the computer that when you run CLEANMGR with the Registry Entry n, to clean these files.
  6. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "OK" when you are finished selecting.
Method 2 of 5:

Disk Cleanup Second Phase

  1. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click on "Start" Menu.
  2. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click on "All Programs"
  3. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click on "Accessories"
  4. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click on "System Tools"
  5. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click on "Scheduled Tasks"
  6. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Double-Click "Add Scheduled Task" The schedule task wizard will open.
  7. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Next"
  8. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Browse"
  9. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Browse to "C:WINDOWSSystem32" Please note that if you do not have a "C:WINDOWS" look for "C:WINNT" instead.
  10. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "cleanmgr.exe"
  11. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Weekly"
  12. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Next"
  13. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Choose Run Time that is convenient for you. Sunday at 2AM is a good setting.
  14. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Enter the Admin User/Password
  15. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Check "Open advanced properties"
  16. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Next"
  17. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    From the "Task" Tab update the Run line with the following: "C:WINDOWSsystem32cleanmgr.exe /sagerun:n" using the same n that was set in the Disk Cleanup First Phase Section
  18. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    From the "Settings" Tab, under "Power Management" check off the "Wake the Computer"
Method 3 of 5:

Disk Check First Phase

Check Disk - Windows bundled tool for checking for errors and repairing them on your hard drive, the next time the computer is rebooted.

  1. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Return the Focus to the DOS Prompt Window, by clicking the Window Border.
  2. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Type "notepad"; Press Enter.
  3. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Type echo y|chkdsk C: /f/r
    1. echo y|chkdsk for each additional drive letter: /f/r
    2. shutdown /r
  4. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    When finished save the file by Clicking on "File"
  5. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Save As"
  6. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    In the "File Name" line type "checkdisk.bat" with the Double-Quotation Marks.
Method 4 of 5:

Disk Check Second Phase

  1. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Return the Focus to the "Scheduled Tasks"
  2. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Double-Click "Add Scheduled Task" The schedule task wizard will open.]
  3. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Next"
  4. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Browse"
  5. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Browse to the location where you save the file "checkdisk.bat"
  6. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Weekly"
  7. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Next"
  8. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Choose Run Time that is convenient for you, Monday at 2AM is a good setting.
  9. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Enter the Admin User/Password
  10. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Check "Open advanced properties"
  11. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Next"
  12. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    From the "Settings" Tab, under "Power Management" check off the "Wake the Computer"
Method 5 of 5:

Disk Defrag Phase

Disk Defrag - Windows bundled tool that reorganizes files more efficiently. Windows is very sloppy when it comes to handling files. Instead of saving them where they belong on your hard drive Windows sticks them where ever it's most convenient. Over time this will slow your computer down.

  1. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Return the Focus to the "Scheduled Tasks"
  2. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Double-Click "Add Scheduled Task" The schedule task wizard will open.
  3. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Next"
  4. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Browse"
  5. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Browse to "C:WINDOWSSystem32" Please note that if you do not have a "C:WINDOWS" look for "C:WINNT" instead.
  6. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "defrag.exe"
  7. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Weekly"
  8. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Next"
  9. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Choose Run Time that is convenient for you, Tuesday at 2AM is a good setting.
  10. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Enter the Admin User/Password
  11. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Check "Open advanced properties"
  12. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Click "Next"
  13. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    From the "Task" Tab update the Run line with the following: "C:WINDOWSsystem32defrag.exe C"
  14. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    From the "Settings" Tab, under "Power Management" check off the "Wake the Computer"
  15. images 1 of How to Run Windows XP System Maintenance With Automated Scripts
    Repeat this process for each additional drive letter replacing C for the current drive that you wish to defrag, and add a day to the Schedule.

Was this article helpful?

Your feedback helps us improve.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.