Tech Tips Home
The Best Tech Tips And Daily Deals
Newsletter On The Internet!

Shop online 24hrs a day or call us Mon-Fri
8:30AM-4:30PM EST - 1-800-915-2088
WorldStart Tech Tip And Store Search
Email: Password: Login Remember Me

Like what you see here? Subscribe to the Tech Tips newsletter!   Email: Subscribe

Clean Up Your PC Automatically

Monday, September 13th, 2010 by | Filed Under: System Tune-Up Help, Uncategorized
 
Loading...


Note: This will only work on Professional editions of Windows XP, Vista, and Windows 7.

Unwanted files and folders have been plaguing PC users since the first computers were made. And, it goes beyond operating systems.

Whether you’re using Windows, Linux or a have a Mac, excess files will always clutter your computer and consume precious hard drive space.

Every time you install a program, surf the web or use an application, new files and folders are created on your computer. Some are created by you and are useful, but many others are temporary files, copies of files or files that are obsolete.

Sure, you could delete them manually, but they would just end up in the Recycle Bin. Then, you’d have to delete them all over again, only to start over the next day.

It’s a problem that, so far, has no solution. However, there is a way to lessen the impact this problem has on your time.

Just let Windows handle the cleanup process automatically.

Despite the huge number of programs promising to rid your computer of unwanted files, you don’t need to use any third party cleanup software.
Windows has its own cleanup utility that will do a better job at cleaning your computer of excess files and folders. Moreover, it will not bother you with adware or toolbars.

Using the Disk Cleanup Tool integrated in Windows and the Local Group Policy Editor, you can create an automated command to empty the Recycle Bin and delete temporary files and other unwanted files from your computer at each shutdown.

I’ll show you how, in the next steps.

First, we need to access the Disk Cleanup Tool.

image

Go to the Start Menu and click on the Run command, situated above the Turn off Computer button (or the search field in Vista and 7).

Then type the command cleanmgr /sageset:1 in the Open box and click the OK button.

Note: To access the Disk Cleanup Tool in Windows Vista and Windows 7 you must log in with an administrator account.

image

In the Disk Cleanup Settings window, check all the items on the list and click OK.

Now, we need to open the Local Group Policy Editor.

Go to the Start Menu and click on the Run command, situated above the Turn off Computer button. Then type the command gpedit.msc in the Open box (or the search field in Vista and 7) and click the OK button.

Note: To access the Local Group Policy Editor in Windows Vista and Windows 7 you must log in with an administrator account.

The Local Group Policy Editor will now open.

image

On the left side of the window, under User Configuration, double-click the Windows Settings folder.

Then, under Windows Settings, click on Scripts (Logon/Logoff).
On the right side of the window, double-click the Logoff option.

In the Logoff Properties window, click the Show Files… button.

This will open the Logoff folder. We need to create a command file in this folder that will run automatically at every system shutdown.

Before we create the file, we need to go into the advanced folder options and make Windows show file extensions.

image

Still in the Logoff folder, click on Tools (located in the top left). Then click on Folder Options…, from the menu.

In the Folder Options window, click on the View tab. Uncheck the Hide extensions for known file types box and click OK.

Back in the Logoff folder, right-click on an empty spot and from the menu choose New and then click on Text Document.

Name this new file Cleanup.cmd, press the Enter key and click Yes.

Note: Make sure the file has the .cmd extension (cog icon) and not the .txt extension (notepad icon).

Now, right-click on the Cleanup.cmd file and choose Edit from the menu. This will open the file in Notepad.

Next, type cleanmgr /sagerun:1 and press Ctrl + S from the keyboard to save the file.

Close the Cleanup.cmd file and the Logoff folder and go back to the Logoff Properties window (follow the steps above if it’s closed).


image

Next, click the Add… button, then click the Browse… button, in the Add a Script window.

Now, click on the Cleanup.cmd file, click Open and then OK.

In the Logoff Properties window, click OK and exit the Local Group Policy Editor.

That’s it! You’re done.

Now each time you shutdown the computer, the Disk Cleanup Tool will start to remove any temporary files and empty the Recycle Bin.

Note: If you use Windows Vista or Windows 7, the User Account Control security feature could block the script from running. As such, the Cleanup script might ask you to enter an administrator password to continue or it might not work at all. One solution would be to change the User Account Control options to a lower setting and allow the script to run.

~Cosmin Ursachi

Leave a Reply


Like these tips? Get them for FREE in your email!

WorldStart's Tech Tips Newsletter

  • Tech Tips Daily - Become a tech pro! Get the very best tech and computer help sent directly to your email every weekday!

  • Tech Tips Weekly - If you don't want our Tech Tips newsletter every day, then sign up for this weekly newsletter to get the best information of the week. Sent on Fridays.

Other Newsletters

  • WorldStart's Daily Deals - Every week, we send out great deals in our Daily Deals newsletter. Many of these deals are exclusively for our Daily Deals newsletter subscribers and can't be found with our regular specials.

  • Just For Grins - Each issue includes a couple clean jokes, some funny quotes, and a hilarious reader's story. Newsletter is sent five days a week.


Enter Email Address:

Subscribe

Your e-mail address is safe with us!
We only use it to send you the newsletters you request. It is NEVER disclosed to a third party for any reason, ever! Plus, if you decided you don't like our newsletters (don't worry, you'll love them), unsubscribing is fast and easy.

Free Newsletter Signup



Tech Tips Daily

Become a tech pro! Get the very best tech and computer help sent directly to your email every weekday!

Tech Tips Weekly

The week's best in tech and computer help. Get your issue sent to your email every Friday!

WorldStart's Daily Deals

The very best deals on the Internet! Get a new set of incredible sales every day of the week!

Just For Grins

Clean jokes, funny quotes, and hilarious comics. Sent 5 times a week straight to your email.


Subscribe


Love Worldstart? Refer A Friend!

WorldStart's Premium Membership

Tip Archive


Categories:
Archives: