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.
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.
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.
To add a shortcut to the desktop.
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.
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
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.
System Manufacturer/Model Number Home built OS Windows 7 Ultimate 32 bit CPU Intel(R) Pentium(R) 4 CPU 3.00GHz Motherboard ASUS P4P800-VM Motherboard Chipset: Intel 865G + ICH5 Memory 2.50 GB RAM Graphics Card NVIDIA GeForce 7600 GS Sound Card SoundMax Integrated Digital Audio (Chip) Monitor(s) Displays ViewSonic VX 1962 wm Screen Resolution 1680 X 1050
Keyboard Microsoft Comfort Curve Keyboard 2000 v10 USB Mouse Logitec optic USB Cooling Fan based Hard Drives Seagate Barracuda 7200.10 80 GB
ST380215A ATA Device 18.6 GB
Western Digital "My Book" external hard drive 750 GB Internet Speed 3.01 Mb/s download 0.64 Mb/s upload
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.
Last edited by CarlTR6; 05 Apr 2010 at 08:37 PM..
Reason: Corrected a typing error.
System Manufacturer/Model Number Home built OS Windows 7 Ultimate 32 bit CPU Intel(R) Pentium(R) 4 CPU 3.00GHz Motherboard ASUS P4P800-VM Motherboard Chipset: Intel 865G + ICH5 Memory 2.50 GB RAM Graphics Card NVIDIA GeForce 7600 GS Sound Card SoundMax Integrated Digital Audio (Chip) Monitor(s) Displays ViewSonic VX 1962 wm Screen Resolution 1680 X 1050
Keyboard Microsoft Comfort Curve Keyboard 2000 v10 USB Mouse Logitec optic USB Cooling Fan based Hard Drives Seagate Barracuda 7200.10 80 GB
ST380215A ATA Device 18.6 GB
Western Digital "My Book" external hard drive 750 GB Internet Speed 3.01 Mb/s download 0.64 Mb/s upload
System Manufacturer/Model Number Home built OS Windows 7 Ultimate 32 bit CPU Intel(R) Pentium(R) 4 CPU 3.00GHz Motherboard ASUS P4P800-VM Motherboard Chipset: Intel 865G + ICH5 Memory 2.50 GB RAM Graphics Card NVIDIA GeForce 7600 GS Sound Card SoundMax Integrated Digital Audio (Chip) Monitor(s) Displays ViewSonic VX 1962 wm Screen Resolution 1680 X 1050
Keyboard Microsoft Comfort Curve Keyboard 2000 v10 USB Mouse Logitec optic USB Cooling Fan based Hard Drives Seagate Barracuda 7200.10 80 GB
ST380215A ATA Device 18.6 GB
Western Digital "My Book" external hard drive 750 GB Internet Speed 3.01 Mb/s download 0.64 Mb/s upload
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)
Computer type PC/Desktop System Manufacturer/Model Number Self Built OS Windows 7 Ultimate X64 SP1 CPU Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz Motherboard Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz Memory 8GB 1333Mhz DDR3 Graphics Card NVIDIA GeForce GTX 460 Sound Card Realtek Monitor(s) Displays Acer Al1980, Screen Resolution 1360*768
Keyboard Alba USB Mouse IT Works Wireless USB PSU 750W Cooler Master Case Cooler Master Haf X Cooling Cooler Master Hyper TX3 Hard Drives 500GB SATA WBC
1TB WD Caviar Green
80GB IDE Samsung Internet Speed 12Mb/s Down 1.2 Mb/s Up
Computer type PC/Desktop System Manufacturer/Model Number Compaq sr5410f case OS Windows 7 Pro 64 SP1 CPU AMD X2 4450E @ 2.3 ghz Motherboard Biostar MCP6P M2+ Memory 4.0 g Graphics Card Nvidia GeForce 9600 GT , 512mb Sound Card onboard Monitor(s) Displays auria eq2367 Screen Resolution 1920 x 1080
Keyboard logitech wave cordless Mouse logitech LX8 cordless laser mouse PSU 250 watts Case Compaq Cooling couple fans Hard Drives 1 tb Hitachi HDT721010SLA scsi, 500 gb external Internet Speed comcast hi speed 19 dn 8 up Antivirus Microsoft Security Essentials Browser IE10 Other Info Laptop specs: HP g7-1365dx /
CPU: AMD A6-3420M APU with Radeon(tm) HD Graphics /
RAM: Crucial 8Gb (2x4Gb) /
SSD: Crucial M4-CT128M4SSD2 ATA Device/ FW 000F /
GFX: AMD Radeon HD 6520G /
OS: Microsoft Windows 7 Professional 64-bit 7601 Multiprocessor Free Service Pack 1
System Manufacturer/Model Number Home built OS Windows 7 Ultimate 32 bit CPU Intel(R) Pentium(R) 4 CPU 3.00GHz Motherboard ASUS P4P800-VM Motherboard Chipset: Intel 865G + ICH5 Memory 2.50 GB RAM Graphics Card NVIDIA GeForce 7600 GS Sound Card SoundMax Integrated Digital Audio (Chip) Monitor(s) Displays ViewSonic VX 1962 wm Screen Resolution 1680 X 1050
Keyboard Microsoft Comfort Curve Keyboard 2000 v10 USB Mouse Logitec optic USB Cooling Fan based Hard Drives Seagate Barracuda 7200.10 80 GB
ST380215A ATA Device 18.6 GB
Western Digital "My Book" external hard drive 750 GB Internet Speed 3.01 Mb/s download 0.64 Mb/s upload
System Manufacturer/Model Number Home built OS Windows 7 Ultimate 32 bit CPU Intel(R) Pentium(R) 4 CPU 3.00GHz Motherboard ASUS P4P800-VM Motherboard Chipset: Intel 865G + ICH5 Memory 2.50 GB RAM Graphics Card NVIDIA GeForce 7600 GS Sound Card SoundMax Integrated Digital Audio (Chip) Monitor(s) Displays ViewSonic VX 1962 wm Screen Resolution 1680 X 1050
Keyboard Microsoft Comfort Curve Keyboard 2000 v10 USB Mouse Logitec optic USB Cooling Fan based Hard Drives Seagate Barracuda 7200.10 80 GB
ST380215A ATA Device 18.6 GB
Western Digital "My Book" external hard drive 750 GB Internet Speed 3.01 Mb/s download 0.64 Mb/s upload