Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Disk Cleanup : Extended



Disk Cleanup : Extended

How to Use Extended Disk Cleanup in Vista, Windows 7, and Windows 8
Published by Bare Foot Kid
05 Apr 2010
Default Disk Cleanup : Extended

How to Use Extended Disk Cleanup in Vista, Windows 7, and Windows 8

This will show you how to access and run the Extended Disk Cleanup function in Windows, allowing you to clean up more HDD space for you to use.

Note   Note

This must be done in an elevated command window to complete.



Let's get started!

1) In the Windows 7 start menu search box type "cmd" (without the quotes) right click the entry and select "Run As Administrator" then enter your user credentials for the UAC prompt and click yes to open the command window.
Name:  cmd runas.jpg
Views: 12512
Size:  61.6 KB
Name:  cmd UAC.jpg
Views: 12454
Size:  81.3 KB
2) In the command window that opens type the command below and hit enter.

Be advised: the command window must be left open while the cleanup is carried out.

Code:
%SystemRoot%\System32\Cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535

Disk Cleanup : Extended-cmd-text.jpg

3) Now you will see the Disk Cleanup Settings window with more options available to you, select the ones you want to clean up then click ok; wait for the search and then the cleanup and then you're done.
Name:  disk cleanup.jpg
Views: 12822
Size:  119.8 KB
Name:  Checking.jpg
Views: 12399
Size:  48.5 KB
Name:  cleaning.jpg
Views: 12387
Size:  43.8 KB
To add a shortcut to the desktop.

Note   Note

This .bat file was created by CarlTR6 credit for this goes to him!


1) In the Windows start menu search box type "notepad" (without the quotes) right click the entry and choose Run as Administrator then enter your user credentials in the UAC prompt and click yes to open notepad.
Name:  Notepad Runas.jpg
Views: 12355
Size:  65.7 KB
Name:  UAC Notepad.jpg
Views: 12339
Size:  79.4 KB
2) In notepad type the code below then in the upper left of notepad at File select "Save as" name the file anything you want but it must have the .bat extension then browse to C:/Windows/System32 and click Save, then back at "File" click "Exit" to close notepad.
Code:
 cd C:\windows\system32 
%SystemRoot%\System32\Cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535
Disk Cleanup : Extended-carl-s.jpg
Disk Cleanup : Extended-carl-s1.jpg
Name:  Carl's2.jpg
Views: 12462
Size:  128.4 KB
3) Now click an empty spot on the desktop and click, "New, Shortcut" in the "Create Shortcut" window browse to C:\Windows\System32\<your file name.bat> and click ok, then in the next window click next, then for the last "Choose Name" window name the shortcut whatever you want (I chose something clever, "Clean") then click "Finish" to add the shortcut to the desktop, you're done.
Name:  Carl's6.jpg
Views: 12300
Size:  56.0 KB
Name:  Carl's7.jpg
Views: 12420
Size:  84.1 KB
Name:  Carl's8.jpg
Views: 12367
Size:  64.6 KB
Name:  Name.jpg
Views: 12303
Size:  42.9 KB
Name:  Clean.jpg
Views: 12313
Size:  28.7 KB
Enjoy!



Published by
05 Apr 2010   #1
CarlTR6

Windows 7 Ultimate 32 bit
 
 

Thanks BFK; it worked well. I need to create a batch file for this.


My System SpecsSystem Spec
05 Apr 2010   #2
Bare Foot Kid
Microsoft MVP

W 7 64-bit Ultimate
 
 

Thanks Carl, if you want to post the .bat for others, feel free.
My System SpecsSystem Spec
05 Apr 2010   #3
CarlTR6

Windows 7 Ultimate 32 bit
 
 

I created the batch file in Notepad and named it clean.bat. The name does not matter; you can name it anything you wish as long as you give it the .bat extension.

Open Notepad. copy and paste the two lines below into Notepad.

cd C:\windows\system32
%SystemRoot%\System32\Cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535

Click on File and select Save as...

Type the file name and give it the .bat extension.

Select All files (*.*) and click Save.

Once I saved the file I moved it from the Documents folder to the Windows> System32 folder. The path on my computer is C:\Windows\System32.

To run the batch file and the program, open cmd as an administrator and type "clean" or whatever you named the file (without the quotation marks) at the prompt and hit Enter.
My System SpecsSystem Spec
.


05 Apr 2010   #4
Bare Foot Kid
Microsoft MVP

W 7 64-bit Ultimate
 
 

Cool, thanks Carl.
My System SpecsSystem Spec
05 Apr 2010   #5
CarlTR6

Windows 7 Ultimate 32 bit
 
 

You are welcome. I hope it helps someone.
My System SpecsSystem Spec
05 Apr 2010   #6
severedsolo

Windows 7 Ultimate X64 SP1
 
 

carl and BFK great work, i would rep you, but apparently i havent repped enough people yet to make it work

carl i think your batch file is slightly wrong, i get "the filename directory name or volume syntax is incorrect" it still works because it has defaulted to C:\windows\system 32 anyway but on the first line, rather than "cd\C:\windows\system 32" shouldnt it be "cd c:\windows\system 32 (with a space instead of the slash)
My System SpecsSystem Spec
05 Apr 2010   #7
derekimo

Microsoft Community Contributor Award Recipient

Windows 7 Pro 64 SP1
 
 

Thanks Ted and Carl, Nice Work!
+rep For both of you.
Derek

Thanks severedsolo also for spotting that.

The new one works perfect Carl.
My System SpecsSystem Spec
05 Apr 2010   #8
CarlTR6

Windows 7 Ultimate 32 bit
 
 

Yes, it should. That is a mistype on my part. I will correct it. Thank you very much.
My System SpecsSystem Spec
05 Apr 2010   #9
CarlTR6

Windows 7 Ultimate 32 bit
 
 

Thank you Derek. Much appreciated.
My System SpecsSystem Spec
Comment

 Disk Cleanup : Extended




Tutorial Tools



Similar help and support threads for2: Disk Cleanup : Extended
Windows 7 Tutorial Category
Disk Cleanup - Open and Use Tutorials
Disk Cleanup Performance & Maintenance
disk cleanup? Performance & Maintenance
Disk Cleanup Question Please? Performance & Maintenance
Disk Cleanup Performance & Maintenance
Extended Disk Cleanup : New Tutorial! Chillout Room
Uhh, Disk Cleanup Question... Performance & Maintenance

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 04:10 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33