PC Tips and Tricks

Speed up your PC

Automate Windows Disk Clean up

By following a few simple guidelines, you can maintain your computer and keep it running smoothly. This article discusses how to use the tools available in Windows 7, Vista, and XP Service Pack 3 (SP3) to more efficiently maintain your computer.

The Disk Cleanup tool helps you free up space on your hard disk to improve the performance of your computer. The tool identifies files that you can safely delete, and then enables you to choose whether you want to delete some or all of the identified files.

Use Disk Cleanup to:
• Remove downloaded program files (such as Microsoft ActiveX controls and Java applets).
• Empty the Recycle Bin. 
• Remove Windows temporary files such as error reports.
• Remove optional Windows components that you don’t use.
• Remove installed programs that you no longer use. 
• Remove unused restore points and shadow copies from System Restore.

Tip: Typically, temporary Internet files take the most amount of space because the browser caches each page you visit for faster access later.

How to configure disk clean up task
Click Start, select Run then type cleanmgr /d c:/sageset:100 in the box. The disk Cleanup box appears allowing you to select the items you want to be cleaned each time the task is run for example Recycle Bin, Temporary Internet Files, Old Chkdsk files and then click on OK.

/d driveletter: – This switch selects the drive that you want Disk Cleanup to clean. Note that the /d switch is not used with /sagerun:n.

Create a new shortcut in your Windows folder using cleanmgr /sagerun:100 as the command line. Name it as CleanupTask.

Note: you can find Disk Cleanup by clicking Start, select Programs, Accessories, System Tools then click on Disk Cleanup.

Scheduling disk clean up
1. Open Scheduled Tasks from Start Menu, Accessories, System Tools.

2. Double-click Add Scheduled Task

3. Choose Next

4. Click on Browse and locate the shortcut file that you just created [CleanupTask]

5. Choose Weekly and click Next

6. Select the Time and day during which you want the CleanupTask to run.

7. Click Next

8. Type-in the Username and password. [By default, task scheduler won’t run with blank password]

9. Choose Next, Finish

Note: In the event you have chosen not to create a desktop shortcut.

When you reach step 4 browse to C:\Windows\System32\ and select cleanmgr then click OK and proceed to step 5 and continue.

Reference: sageset:n – option displays the Disk Cleanup Settings dialog box and also creates a registry key to store the settings that you select. The n value, which is stored in the registry, allows you to specify tasks for Disk Cleanup to run. The n value can be any integer value from 0 to 65535. To have all of the options available when you use the /sageset option, you might need to specify the drive where Windows is installed. You can have any number of tasks created [in Sageset 1, you can select "Recycle Bin", in Sageset configuration 2, you can deselect Recycle-bin. Each of the Sageset configurations are stored in the following registry key and sub-keys:

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \VolumeCaches

Tip:
1.You shouldn’t edit registry keys unless you are competent engineer, errors can render your PC unusable.
2. Third party registry cleaners are not recommended.

Next article “Does your computer need more memory”

Advertisements