Welcome to YLOAN.COM
yloan.com » Windows » Schedule Disk Cleanup in Windows 7 or Vista
Games Personal-Tech Data Entry registry cruise torrent mac code virus storage uninstaller systems cisco bugs wireless codes maintenance dell update communication trojan atlanta Data Backup Data Storage Data Protection Data Recovery Anti-Virus Windows Linux Software Hardware Mobil-Computing Certification-Tests Computers & Internet Internet

Schedule Disk Cleanup in Windows 7 or Vista

Schedule Disk Cleanup in Windows 7 or Vista


As an experienced computer user, I think it is necessary for every computer user can have good habits to make your computer run healthy. Here, I introduce one of the good habits-how to schedule Disk Cleanup in Windows 7 or Vista.

Schedule Disk Cleanup Basic

Windows includes some handy tools to help keep your machine operating smoothly. One such tool is Disk Cleanup that can remove temp and old files to help you reclaim some hard drive space. You might want to set it up to run weekly or monthly depending on what works best for you.


Note: For this example we're using Windows 7, but the steps are essentially the same in Vista as well.

To schedule Disk Cleanup to run on a regular basis we need to schedule a task. Click on the Start Menu and enter task scheduler into the search box and hit Enter.

The Task Scheduler opens and you'll want to click on "Action" then select "Create Basic Task".

Then the Create Basic Task Wizard comes up and from here type in a name for the task and a description then click "Next".

Now select how often you want Disk Cleanup to run (Weekly, Daily, Monthly, One Timeetc). There is not right or wrong answer to how often you run it. It's just depend on you . In this example we're going to select weekly.

Since we set it up to run weekly we need to schedule it when to start, how often it reoccurs, and which day of the week to run it.

Next under Action select "Start a program".

In the Program/script field type in cleanmgr.exe

Or you can hit browse and select Disk Cleanup which is in C:Windows|system32cleanmgr.exe

Under Program/script you'll see the path to Disk Cleanup as C:Windowssystem32cleanmgr.exe

Then you're shown a summary of the scheduled task and if everything looks correct click on "Finish".

For this basic setting we scheduled it for a time when we know the computer will be in use. When it's time for the Scheduled Task to occur it will pop up and you can run it by selecting the drive to clean up.

Disk Cleanup starts its calculations, just wait for it .

Now the results and you can choose the files to delete.

Advanced Command Line Switches

After the above method is effective, you may not want to interact with the Disk Cleanup utility. If you want to select what to have cleaned up and run everything automatically, you should run a couple of command line switches.

To open the Command Prompt type cmd into the search box in the Start Menu and hit Enter.

With the Command Prompt open type in the following:

cleanmgr.exe /sageset:1

That will open the Disk Cleanup Settings dialog box where you can select the items you want Disk Cleanup to delete. You'll notice there are a lot more options here than when you go through the GUI to cleanup files.

After selecting the files you need delete in Disk Cleanup Settings. Just click "Ok" to close out of the screen. The /sageset:1 command creates a registry key that saves the settings you entered.

Now go in and create your Scheduled Task like we showed previously, but this time you'll want to add in /sagerun:1 into the Add argument field.

Now when Disk Cleanup runs it'll retrieve those saved settings you created with /sageset:1 and you won't need to interact with Disk Cleanup at all. It will run automatically and clean up the files you selected in Disk cleanup Settings.

Task Scheduler Error

Maybe you will get the following error message when you launch Task Manager in Windows 7. It tells you to hit refresh but the error keeps coming back. It's quite annoying althought it doesn't seem to negatively affect anything you schedule.

From the research I've done on this error, there are a handful of different solutions that have worked for different people. On our system, the Disk Defrag Schedule was turned off, so we turned it back on and resolved the issue. On a separate Windows 7 system the Disk Defrag Schedule was already on (which it is by default) and turning it off cured the error. On another machine I had to turn it off then back on to fix the error message.

Since this "rub your head and pat your belly" approach worked we didn't try any other possible fixes.


Conclusion

If you use the advanced switches to run Disk Cleanup it actually offers a lot more choices. In the /sageset:1 switch, "1" is just an arbitrary number. You can enter any number you want, but make sure /sagerun:"x" corresponds to the number you used in /sageset:"x". So you can customize the switches for different types of files you want to clean in Disk Cleanup Settings.

For example, maybe you only want to clean Temp Internet files during a cleanup session, then you could do /sageset:1 and /sagerun:1 for that. Then if you want to clean up all files you could use /sageset:10 and /sagerun:10 for that. The switches give you more flexibility in the types of files that are deleted during the Disk Cleanup session. Whichever method you use, or if you just want to run it manually, running Disk Cleanup will keep your drive free of unwanted files.

Welcome to Newton360 to get more information.
Features Of The Best Online Computer Repair Tools Install Windows 7 from a USB Flash Drive How to Install the Updated XP Mode which Requires no Hardware Virtualization on Windows 7 4 Cool Music Desktop Gadgets For Vista and Windows 7 How to Access Frequently Used Items in Windows 7 with Jump Lists Sqlite.Exe Download ? - Try This Repair Tool ! Agb.Exe Error - Quick Errors Repair Guide ! The Top Registry Cleaner Tool you need for speeding up your PC instantly now! You need The Best Registry Cleaner Program For Windows 7 instantly! How to Repair Iron Curtain Rings Windows Vista Speedup -- How to speed up Windows instantly? Get The Best Registry Repair Program To Speed Up Windows Vista instantly Speeding Up Windows With a Registry Cleaner -- You need it right now!
print
www.yloan.com guest:  register | login | search IP(3.16.30.154) / Processed in 0.009449 second(s), 7 queries , Gzip enabled , discuz 5.5 through PHP 8.3.9 , debug code: 68 , 5356, 13,
Schedule Disk Cleanup in Windows 7 or Vista