Results 1 to 4 of 4

Thread: [tool] Run this before starting your spyware removal

  1. #1
    Senior Member Spyrus's Avatar
    Join Date
    Oct 2002
    Posts
    741

    [tool] Run this before starting your spyware removal

    Wrote a quick something something to run before you start any spyware/adaware/virus removals. or just a good cleanup script

    Open notepad and save file as whatever you want.bat

    @echo off
    rem Temp File cleanup script

    if (%os%) == (Windows_NT) goto NTXP
    goto 9x

    :NTXP
    setlocal
    echo.
    echo Deleting Temp Files
    echo.
    del /f /s /q "%homedrive%\temp\*.*"
    del /f /s /q "%systemroot%\temp\*.*"
    del /f /s /q "%systemroot%\prefetch\*.*"
    del /f /s /q "%systemroot%\system32\config\systemprofile\cookies\*.*"
    del /f /s /q "%systemroot%\system32\config\systemprofile\local settings\temp\*.*"
    del /f /s /q "%systemroot%\system32\config\systemprofile\local settings\history\*.*"
    del /f /s /q "%systemroot%\system32\config\systemprofile\local settings\temporary internet

    files\*.*"

    cd %userprofile%\..
    del /f /s /q "default user\cookies\*.*"
    del /f /s /q "default user\local settings\temp\*.*"
    del /f /s /q "default user\local settings\history\*.*"
    del /f /s /q "default user\local settings\temporary internet files\*.*"
    del /f /s /q "administrator\cookies\*.*"
    del /f /s /q "administrator\local settings\temp\*.*"
    del /f /s /q "administrator\local settings\history\*.*"
    del /f /s /q "administrator\local settings\temporary internet files\*.*"
    del /f /s /q "localservice\cookies\*.*"
    del /f /s /q "localservice\local settings\temp\*.*"
    del /f /s /q "localservice\local settings\history\*.*"
    del /f /s /q "localservice\local settings\temporary internet files\*.*"
    del /f /s /q "networkservice\cookies\*.*"
    del /f /s /q "networkservice\local settings\temp\*.*"
    del /f /s /q "networkservice\local settings\history\*.*"
    del /f /s /q "networkservice\local settings\temporary internet files\*.*"
    del /f /s /q "%userprofile%\cookies\*.*"
    del /f /s /q "%userprofile%\local settings\temp\*.*"
    del /f /s /q "%userprofile%\local settings\history\*.*"
    del /f /s /q "%userprofile%\local settings\temporary internet files\*.*"

    echo.
    echo Finished deleting
    echo.
    endlocal
    goto end

    :9x
    del /f /s /q "%windir%\temporary internet files\*.*"
    del /f /s /q "%windir%\cookies\*.*"

    :end
    Duct tape.....A whole lot of Duct Tape
    Spyware/Adaware problem click
    here

  2. #2
    Blast From the Past
    Join Date
    Jan 2003
    Posts
    729
    nifty...creative...thank you
    work it harder, make it better, do it faster, makes us stronger

  3. #3
    IT Specialist Ghost_25inf's Avatar
    Join Date
    Sep 2001
    Location
    Michigan
    Posts
    648
    Hello Spyrus

    I ran this script and found a flaw dont know if its on your end or mine but the temporary internet files and history files under userprofile dont clean out. Now I looked at the properties for the folders and noticed read only was checked and when I unchecked it and clicked ok it would reset itself back to read only. I really like this script and would love to see more added as I have myself added this line (del /f /s /q "%userprofile%\Recent\*.*").

    Thank you ahead of time.
    S25vd2xlZGdlIGlzIHBvd2VyIQ

  4. #4
    Senior Member
    Join Date
    Oct 2005
    Posts
    197
    Not a bad little script. I think ill test it out a little bit. Ill pm you if I add anything too it
    meh. -ech0.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •