Search This Blog

Thursday, December 8, 2011

TỰ ĐỘNG DỌN SẠCH Ổ CỨNG TRÊN WIN 7

Automate Disk Cleanup with Scheduled Tasks

Once you've created your sageset which tells Windows which files to delete during an automatic disk cleanup, you need to define when this process should run. This is done using the Scheduled Tasks tool found under Start | All Programs | Accessories | System tools or through Control Panel.

The Scheduled Tasks tool is another tool that is rarely used. It allows you to run a program on a predefined basis whether it is daily or a one time basis. It works with many programs and not just cleanmgr.exe. For our purposes, we will use it to run cleanmgr.exe with our defined sageset. This is done using the advanced features and the sagerun command.  

To set a scheduled task with sagerun .

1. Click Start
2. Click Control Panel
3. Click Scheduled Tasks
4. Click Add Scheduled Tasks to start the Scheduled Task Wizard
5. Click Next. There will be a noticeable delay while the system retrieves your programs.
6. An alphabetical list displays with many of your programs. Most likely, you will not see cleanmgr.exe listed so you need to click Browse?
7. In the Select Program to Schedule dialog, click the Windows folder.
8. In the same dialog, click the system32 folder.
9. Click cleanmgr.exe
10. Click Open.
11. In the Scheduled Task Wizard, click the radio button for how often this task should be performed.
12. Click Next.
13. Set your time parameters.
14. Click Next.
15. Enter any passwords that might be required
16. Click Next
17. Click the checkbox for Open advanced properties for this when I click Finish.
18. In the cleanmgr dialog, type a space and then /sagerun:1 after the Run: line.
19. Click Apply.
20. Click OK.
When the designated time occurs, your custom cleanmgr program should kick off. If it doesn't, open Scheduled Tasks and see if anything shows in the Status column.

No comments:

Post a Comment