BoardBabe Posted November 26, 2005 Share Posted November 26, 2005 (edited) Ok, let's make a list of files that can be deleted (during cleanup) after a fresh install of windows, such as *.tmp files *.log files etc. that are left behind by windows setup and are no longer needed after setup has completed (not including "Downloaded Installations" and %temp% dir nor regular cleanup stuff).Here's what I've got, please contribute:%WinDir%\*.log except WindowsUpdate.log%winDir%\*.bak%Windir%\system32\$winnt$.inf%WinDir%\setuplog.txt%winDir%\system32\wbem\Logs\*.log%winDir%\Debug\*.log%winDir%\security\logs\*.log%WinDir%\ntbtlog.txt%WinDir%\OEWABLog.txt%WinDir%\Debug\UserMode\userenv.log Edited November 26, 2005 by BoardBabe Link to comment Share on other sites More sharing options...
MCT Posted November 26, 2005 Share Posted November 26, 2005 ya thats fine, imo run ccleaner Link to comment Share on other sites More sharing options...
gunsmokingman Posted November 27, 2005 Share Posted November 27, 2005 (edited) Here is a VBS script that starts from A SFX file it clean up the UA Driver and Install Folder,pkus some shortcuts then it runs the cleans out the temp files and runs the Clean Manager,then it defrags the local drives. Here is the script for those who wish to modify it more.Save as SystemCleanDefrag.VBSON ERROR RESUME NEXT Const Hidden = 0,Normal = 1,Min = 2 Const HD = 2 Dim Act, Fso, Garbage, Loc, Ts Set Act = CreateObject("Wscript.Shell") Set Fso = CreateObject("Scripting.FileSystemObject") ''''' VARIBLES FOR LOCATION AND THE LOC ARRAY NUMBER FOR THEM'("%AllUsersProfile%")=Loc(0),("%UserProfile%")=Loc(1),("%SystemDrive%")=Loc(2),("%SystemDrive%\Program Files")=Loc(3),("%Windir%")=Loc(4)Loc = Array(Act.ExpandEnvironmentStrings("%AllUsersProfile%"),Act.ExpandEnvironmentStrings("%UserProfile%"),_Act.ExpandEnvironmentStrings("%SystemDrive%"),Act.ExpandEnvironmentStrings("%SystemDrive%\Program Files"),_Wd = Act.ExpandEnvironmentStrings("%Windir%"))Garbage = Array((Loc(0) & "\Desktop\ Java Web Start.lnk"),(Loc(0) & "\Desktop\ Nero StartSmart.lnk"),(Loc(0) & "\Desktop\ Mozilla.lnk"),_(Loc(0) & "\Start Menu\ Set Program Access and Defaults.lnk"),(Loc(0) & "\Start Menu\Windows Catalog.lnk"),(Loc(4) & "\System32\$winnt$.inf"),_(Loc(2) & "\GmanSilentCUP.VBS"),(Loc(2) & "\Drivers"),(Loc(2) & "\Install"))For Each DelF In Garbage '''' CLEAN UP THE UA FILES Fso.DeleteFolder(DelF)Fso.DeleteFile(DelF)Next'''' CLEAN UP THE TEMP DIRECTORY AND RUN CLEAN MANAGER Set Ts = Fso.CreateTextFile("Clean_Temp.Cmd") Ts.WriteLine "Echo Off" Ts.WriteLine "set Clean=""%UserProfile%\Local Settings\Temp""" Ts.WriteLine "cd %Clean%" Ts.WriteLine "del /q *.*" Ts.WriteLine "for /F %%a in ('dir /ad /b') do rd %%a" Ts.Close Act.Run("Clean_Temp.Cmd"),Hidden,True Act.run ("cleanmgr /sagerun:99"),Normal , True Act.popup "Completed The Clean Up", 3 , "Finished", 0 + 48 Fso.deletefile("Clean_Temp.Cmd") '''' DEFRAG THE LOCAL HARD DRIVES Set Drv = Fso.Drives For Each objDrv in Drv If objDrv.DriveType = HD Then Act.Popup "Preparing To Defrag This Drive = " & objDrv.DriveLetter & "\" &_ vbCrLf & "Drive Volume Name = " & objDrv.VolumeName, 5, "Defrag Drive", 0 + 32 Act.Run("Defrag.exe " & objDrv & "\ -F"),Min,True End if Next ''''CLEAN UP THE VBS FILE WHEN COMPLETEDIf Fso.FileExists("SystemCleanDefrag.vbs") Then Fso.DeleteFile("SystemCleanDefrag.vbs") End If SystemCleanDefrag.exe Edited November 27, 2005 by gunsmokingman Link to comment Share on other sites More sharing options...
BoardBabe Posted November 27, 2005 Author Share Posted November 27, 2005 Stick to the topic please. Link to comment Share on other sites More sharing options...
Sonic Posted November 27, 2005 Share Posted November 27, 2005 (edited) Batch mode ...del /f /q /s %SystemRoot%\*.logdel /f /q /s %SystemRoot%\*.bakdel /f /q /s %SystemRoot%\system32\$winnt$.infdel /f /q /s %SystemRoot%\setuplog.txtdel /f /q /s %SystemRoot%\system32\wbem\Logs\*.logdel /f /q /s %SystemRoot%\Debug\*.logdel /f /q /s %SystemRoot%\security\logs\*.logdel /f /q /s %SystemRoot%\ntbtlog.txtdel /f /q /s %SystemRoot%\OEWABLog.txtdel /f /q /s %SystemRoot%\Debug\UserMode\userenv.log Edited November 28, 2005 by sonic Link to comment Share on other sites More sharing options...
BoardBabe Posted November 27, 2005 Author Share Posted November 27, 2005 Hehe ok, let's just terminate this topic. no one seems to understand what the topic is all about. I KNOW FINE HOW TO DELETE THE FILES! I'm just creating a list of left over files that you can ADD to your own cleanup if you please. Link to comment Share on other sites More sharing options...
keytotime Posted November 27, 2005 Share Posted November 27, 2005 Thank's. Link to comment Share on other sites More sharing options...
Sonic Posted November 28, 2005 Share Posted November 28, 2005 Hehe ok, let's just terminate this topic. no one seems to understand what the topic is all about. I KNOW FINE HOW TO DELETE THE FILES! I'm just creating a list of left over files that you can ADD to your own cleanup if you please.For me I have understandood you !! This for other guys Otherwise thanks again ! Link to comment Share on other sites More sharing options...
BoardBabe Posted November 29, 2005 Author Share Posted November 29, 2005 Hehe thank you sonic If you have anything to add to the list, please do Link to comment Share on other sites More sharing options...
Sonic Posted November 29, 2005 Share Posted November 29, 2005 We can delete all temp files too !I use the old deltree command to delete subdirectory too deltree /Y "%SystemRoot%\Temp\*.*" >NULdeltree /Y "%UserProfile%\Local Settings\Temp\*.*" >NUL Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now