| Windows 7: In need of a script... |
12 Oct 2010
|
#1 | | Windows 8 Release Preview Belgrade, Serbia |
In need of a script... I am looking for a script which can delete cookies, Windows + browser cache automatically on a regular (scheduled) basis. Can this be done through Windows itself or would i have to implement a custom script or something?
I am looking to replace CCleaner and similar software package(s). Just now I troubleshooted my sister's PC with an expert who said that stuff like Ccleaner is nothing but trouble. He removed the garbage files manually through Total Commander (ugh), but honestly I can't be bothered to barge into my sis' room every couple of days and ravage through AppData folders to remove temp data and cookies. | My System Specs |
| System Manufacturer/Model Number Custom OS Windows 8 Release Preview CPU Intel Core2Duo E7500 Motherboard Gigabyte EP43-UD3L Memory Kingston 4GB DDR2 (2x2GB) Graphics Card nVidia GeForce 9800GT Sound Card Realtek High Definition Audio Monitor(s) Displays ASUS VH222D WIDE HD 1080P Screen Resolution 1920x1080 Keyboard Logitech Wireless Combo MK260 Mouse Logitech Wireless Combo MK260 PSU 500W Case Custom Midi Tower Hard Drives Western Digital WD3200KS. SATA Internet Speed DSL 1.5M Other Info Speakers: Labtec Pulse 285 S-0158B
Webcam: Logitech Webcam C100 |
12 Oct 2010
|
#2 | | |
have you tried windows disk cleanup?
just type cleanup into the start-menu search-box.
*edit* sorry, re-reading your post it seems you want to automate it.
you can use task-scheduler to (wait-for-it) schedule tasks, but i don't know how to automate the cleanup options... read this tutorial - it's for an annual (!) cleanup, but can be easily modified. | My System Specs | | System Manufacturer/Model Number mickey megabyte 1234 OS ultimate 64 sp1 CPU i5 2500K 3.3@4.2GHz Motherboard MSI P67A-GD53 Memory 8 gigs GSkill Ripjaws 1600 Graphics Card amd hd6950 Sound Card creative x-fi gamer Monitor(s) Displays samsung 24" Screen Resolution 1920x1080 Keyboard saitek eclipse ii Mouse logitech g3 PSU antec 550 Case antec three hundred Cooling i'm a cooling fan Hard Drives ocz vertex 2e 60 gig, samsung f3 1tb, buffalo 2tb ext Internet Speed about 4 Mbps Other Info i love win7 |
12 Oct 2010
|
#3 | | Windows 8 Release Preview Belgrade, Serbia |
Ah, I see now xD
Thanks, will try it, hope it works.
In the meantime, I'd like to hear more suggestions and/or confirmation of efficiency by using this kind of process instead of stuff like Ccleaner (and similar). | My System Specs | | System Manufacturer/Model Number Custom OS Windows 8 Release Preview CPU Intel Core2Duo E7500 Motherboard Gigabyte EP43-UD3L Memory Kingston 4GB DDR2 (2x2GB) Graphics Card nVidia GeForce 9800GT Sound Card Realtek High Definition Audio Monitor(s) Displays ASUS VH222D WIDE HD 1080P Screen Resolution 1920x1080 Keyboard Logitech Wireless Combo MK260 Mouse Logitech Wireless Combo MK260 PSU 500W Case Custom Midi Tower Hard Drives Western Digital WD3200KS. SATA Internet Speed DSL 1.5M Other Info Speakers: Labtec Pulse 285 S-0158B
Webcam: Logitech Webcam C100 |
12 Oct 2010
|
#4 | | Windows7 Pro 64bit SP-1; Windows XP Pro 32bit Grafton,IL |
+1 For Windows disk Clean Up.
It doesn't do any damage and safetly cleans out everything.
The scheduler appears to run as Administrator so it should be thorough.
Weekly looks good or sooner if wanted. Or on start up though it may slow start up a bit.
My 2 pennies.
Mike | My System Specs | | System Manufacturer/Model Number Hopalong/ Godzilla OS Windows7 Pro 64bit SP-1; Windows XP Pro 32bit CPU Intel Core i7-870 Lynnfield 2.93GHz LGA 1156 95W Quad-Core Motherboard ASUS P7P55D-E PRO Memory 8GB@1400MHz Crucial Ballistix DDR3-1600 4x2GB Graphics Card ASUS ENGTX460 DirectCU/2DI/1GD5 1GB 256-bit GDDR5 Sound Card VIA Onboard Monitor(s) Displays Asus VS248H-P 24"; Samsung SyncMaster 941BW 19"ws Screen Resolution 1920x1080; 1440x900 Keyboard Logitech K-320 Mouse Kensington PSU COOLER MASTER Silent Pro RS850-AMBAJ3-US 850W Modular Case COOLER MASTER HAF 932 RC-932-KKN5-GP Black Cooling Scythe "Mugen-2 Rev.B" (2 ScytheKaze-Jyuni PWM fans) Hard Drives Samsung 830 120GB SSD
Intel 320 120GB SSD
Western Digital Caviar Black WD7501AALS 750GB 7200 RPM SATA 3.0Gb/s
Western Digital Caviar Black WD6401AALS 640GB 7200 RPM SATA 3.0Gb/s Antivirus Avast Inernet Suite Browser IE 9 ; Chrome |
12 Oct 2010
|
#5 | | Windows 7 Pro X64 Space Coast of Florida |
You can schedule CCleaner to run automatically once you've set it up the way you want. Not what you asked but thought I'd throw it out here anyway. CCleaner accepts command line parameters. See here: Piriform - Command-line parameters
eg:
CCleaner.exe /AUTO CCleaner runs silently and automatically, using the current set of saved options to clean the PC. CCleaner then exits.
CCleaner.exe /AUTO /SHUTDOWN CCleaner runs silently and automatically, using the current set of saved options to clean the PC. Windows then shuts down automatically.. Note: You cannot run /SHUTDOWN by itself. It must be preceded by /AUTO. | My System Specs | | System Manufacturer/Model Number Dell Precision 370 OS Windows 7 Pro X64 CPU Intel Pentium 4 Dual LP 3.4Ghz Memory 4GB DDR PC2-5200 ECC Graphics Card NVIDIA Quadro FX 3400/4400 Sound Card SoundMAX Integrated Digital Audio Monitor(s) Displays HP 22" w2207 LCD Screen Resolution 1680 x 1050 Hard Drives 300GB Maxtor 6L300RD PATA
128GB Kingston SV200S3128G SSD (boot)
1.5TB Seagate ST3150041AS SATA Internet Speed Cable via Road Runner 2MB Upload, 20MB Download |
12 Oct 2010
|
#6 | | Systems 1 and 2: Windows 7 Enterprise x64, Win 8 Developer University of Kentucky |
Mickey's solution was great. If you wanted to create a batch file ...
DEL /S/F/Q "%USERPROFILE%\Local Settings\Temporary Internet Files\*.*"
DEL /S/F/Q "%USERPROFILE%\Cookies"
DEL /S/F/Q "%USERPROFILE%\Recent"
DEL /S/F/Q "%USERPROFILE%\Local Settings\History"
endif | My System Specs | | System Manufacturer/Model Number Dell and Custom OS Systems 1 and 2: Windows 7 Enterprise x64, Win 8 Developer CPU System 1: i7 2600@3.4GHz, System 2: AMD FX-4100 Zambezi 3.6G Motherboard System 1:Dell 06NWYK System 2: ASUS M5A97 AM3+ Memory System 1: 8GB System 2: 8GB Graphics Card System 1: ATI FirePro V4800 System 2: Radeon HD 6850 Sound Card System 1: onboard System 2: onboard Monitor(s) Displays System1: Viewsonic HDMI 24" Screen Resolution System 1: 1920x1080 System 2: 1920x1080 Case System 1: Dell System 2: Cooler Master Hard Drives System 1: Mirrored .5B drives System 2: Seagate Barracuda ST1000DM003 1TB 7200 RPM 64MB Cache SATA 6.0Gb/s Internet Speed 10 MBPS |
12 Oct 2010
|
#7 | | Windows 8 Release Preview Belgrade, Serbia |
Thanks, Lemur | My System Specs | | System Manufacturer/Model Number Custom OS Windows 8 Release Preview CPU Intel Core2Duo E7500 Motherboard Gigabyte EP43-UD3L Memory Kingston 4GB DDR2 (2x2GB) Graphics Card nVidia GeForce 9800GT Sound Card Realtek High Definition Audio Monitor(s) Displays ASUS VH222D WIDE HD 1080P Screen Resolution 1920x1080 Keyboard Logitech Wireless Combo MK260 Mouse Logitech Wireless Combo MK260 PSU 500W Case Custom Midi Tower Hard Drives Western Digital WD3200KS. SATA Internet Speed DSL 1.5M Other Info Speakers: Labtec Pulse 285 S-0158B
Webcam: Logitech Webcam C100 |
12 Oct 2010
|
#8 | | Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64) Earth - I wish I was on Risa |

Quote: Originally Posted by Lemur Mickey's solution was great. If you wanted to create a batch file ...
DEL /S/F/Q "%USERPROFILE%\Local Settings\Temporary Internet Files\*.*"
DEL /S/F/Q "%USERPROFILE%\Cookies"
DEL /S/F/Q "%USERPROFILE%\Recent"
DEL /S/F/Q "%USERPROFILE%\Local Settings\History"
endif Lemur, respectfully there are several problems with this script. 1) Most of those files do not exist in those places. They are junction points to the real place the files are stored. So if you look in "%USERPROFILE%\Recent" from the Command Prompt you will see that is it empty. You really need to go to: "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Recent" 2) Plus you don't want to delete the desktop.ini files in those folders. Not that it will destroy anything but it will remove the pretty icons and the way the folder functions when you look at them in Windows Explorer. -WS | My System Specs | | System Manufacturer/Model Number Dell OP760 OS Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64) Memory 8GB Monitor(s) Displays 2 Dell 19" LCD Screen Resolution 1280x1024 Keyboard Dell Mouse Dell Optical Internet Speed 40meg |
13 Oct 2010
|
#9 | | Windows 8 Release Preview Belgrade, Serbia |
Thanks for the input, WS, I set up the cleanup utility and scheduled it to run every few days, so it's good | My System Specs | | System Manufacturer/Model Number Custom OS Windows 8 Release Preview CPU Intel Core2Duo E7500 Motherboard Gigabyte EP43-UD3L Memory Kingston 4GB DDR2 (2x2GB) Graphics Card nVidia GeForce 9800GT Sound Card Realtek High Definition Audio Monitor(s) Displays ASUS VH222D WIDE HD 1080P Screen Resolution 1920x1080 Keyboard Logitech Wireless Combo MK260 Mouse Logitech Wireless Combo MK260 PSU 500W Case Custom Midi Tower Hard Drives Western Digital WD3200KS. SATA Internet Speed DSL 1.5M Other Info Speakers: Labtec Pulse 285 S-0158B
Webcam: Logitech Webcam C100 |
13 Oct 2010
|
#10 | | Systems 1 and 2: Windows 7 Enterprise x64, Win 8 Developer University of Kentucky |

Quote: Originally Posted by WindowsStar 
Quote: Originally Posted by Lemur Mickey's solution was great. If you wanted to create a batch file ...
DEL /S/F/Q "%USERPROFILE%\Local Settings\Temporary Internet Files\*.*"
DEL /S/F/Q "%USERPROFILE%\Cookies"
DEL /S/F/Q "%USERPROFILE%\Recent"
DEL /S/F/Q "%USERPROFILE%\Local Settings\History"
endif Lemur, respectfully there are several problems with this script. 1) Most of those files do not exist in those places. They are junction points to the real place the files are stored. So if you look in "%USERPROFILE%\Recent" from the Command Prompt you will see that is it empty. You really need to go to: "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Recent" 2) Plus you don't want to delete the desktop.ini files in those folders. Not that it will destroy anything but it will remove the pretty icons and the way the folder functions when you look at them in Windows Explorer. -WS YIKES! My bad. Old script. Sorry | My System Specs | | System Manufacturer/Model Number Dell and Custom OS Systems 1 and 2: Windows 7 Enterprise x64, Win 8 Developer CPU System 1: i7 2600@3.4GHz, System 2: AMD FX-4100 Zambezi 3.6G Motherboard System 1:Dell 06NWYK System 2: ASUS M5A97 AM3+ Memory System 1: 8GB System 2: 8GB Graphics Card System 1: ATI FirePro V4800 System 2: Radeon HD 6850 Sound Card System 1: onboard System 2: onboard Monitor(s) Displays System1: Viewsonic HDMI 24" Screen Resolution System 1: 1920x1080 System 2: 1920x1080 Case System 1: Dell System 2: Cooler Master Hard Drives System 1: Mirrored .5B drives System 2: Seagate Barracuda ST1000DM003 1TB 7200 RPM 64MB Cache SATA 6.0Gb/s Internet Speed 10 MBPS In need of a script... problems? All times are GMT -5. The time now is 01:39 PM. | |