Jump to content

Recommended Posts


Posted (edited)

I've shown this before but here again. I can do the pre-fetch but can't find right now...

Creates %systemdrive%\XPtemp.cmd and adds the Registry stuff all in 1 file

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG DELETE %KEY% /f
REG ADD %KEY% /V TITLE /D "Deleteting Temp Internet Files, Cookies, History, Pre-Fetch" /f
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\XPTemps /ve "Cache Killer"
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\XPTemps /v 1 /d "cmd /c \"C:\\XPtemp.cmd\"
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\XPTemps /v 2 /d "cmd /c DEL \"C:\\XPtemp.cmd\"

ECHO Title Delete Temp Internet Files, Cookies, History - Please Wait>%systemdrive%\XPtemp.cmd
ECHO cd %homedrive%%homepath%>>%systemdrive%\XPtemp.cmd
ECHO rd /s/q Recent>>%systemdrive%\XPtemp.cmd
ECHO rd /s/q "Local Settings"\"Temporary Internet Files">>%systemdrive%\XPtemp.cmd
ECHO rd /s/q "Local Settings"\temp>>%systemdrive%\XPtemp.cmd
ECHO rd /s/q "Local Settings"\cookies>>%systemdrive%\XPtemp.cmd
ECHO rd /s/q "Local Settings"\history>>%systemdrive%\XPtemp.cmd
ECHO rd /s/q cookies>>%systemdrive%\XPtemp.cmd
ECHO rd /s/q temp">>%systemdrive%\XPtemp.cmd
ECHO rd /s/q history>>%systemdrive%\XPtemp.cmd
ECHO rd /s/q UserData>>%systemdrive%\XPtemp.cmd
ECHO md "Local Settings"\"Temporary Internet Files">>%systemdrive%\XPtemp.cmd
ECHO md "Local Settings"\temp>>%systemdrive%\XPtemp.cmd
ECHO md "Local Settings"\cookies>>%systemdrive%\XPtemp.cmd
ECHO md "Local Settings"\history>>%systemdrive%\XPtemp.cmd
ECHO md Recent>>%systemdrive%\XPtemp.cmd
ECHO md cookies>>%systemdrive%\XPtemp.cmd
ECHO md temp>>%systemdrive%\XPtemp.cmd
ECHO md history>>%systemdrive%\XPtemp.cmd
ECHO md UserData>>%systemdrive%\XPtemp.cmd
REM
REM          C:\Windows Change to your path
ECHO DEL C:\Windows\Prefetch\*.pf>>%systemdrive%\XPtemp.cmd
REM
ECHO EXIT>>%systemdrive%\XPtemp.cmd
EXIT

Run that and reboot. This will do all this probably before you even get logged on unless you have massive Temp stuff.

Edited by maxXPsoft
Posted

Added the reg stuff so its all 1 file. Just click and reboot...

On the Prefetch

I've tried adding this but instead of adding to the XPTemp.cmd above

ECHO CD %systemroot\Prefetch>>%systemdrive%\XPtemp.cmd
ECHO for %a in (*.pf) do DEL %a>>%systemdrive%\XPtemp.cmd

Maybe someone else can enlighten us on how to add this to %systemdrive%\XPtemp.cmd?

Probably be simpler to just add DEL C:\Windows\Prefetch\*.pf but some may have different drive or root.

Posted

thanks maxXPsoft

i need this script not for one time

i make this

XPtemp.cmd

cmdow @ /HID

@echo off

cmdow @ /HID
@echo off

rd /s/q "%windir%\Prefetch\"
rd /s/q "%userprofile%\Local Settings\Temp\"
rd /s/q "%windir%\Temp\"
rd /s/q "%userprofile%\UserData\"
rd /s/q "%userprofile%\Recent\"

md "%windir%\Prefetch"
md "%userprofile%\Local Settings\Temp"
md "%windir%\Temp"
md "%userprofile%\UserData"
md "%userprofile%\Recent"

EXIT

in registry

;Temp Cleaning
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"Cleaning"="C:\\windows\\system32\\XPtemp.cmd"

it is work good :thumbup

thanks

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...