Clean C:\windows\Temp cab files

The below lists what the command will do

  • Turns off windows update service
  • Renames the SoftwareDistribution folder and clears it – this fixes corruption in many *.cab files
  • Deletes all files in c:\windows\temp
  • Turns off Windows modules installer service
  • Deletes all *.cab and *.log files within the c:\windows\logs\cbs folder – this fixes corruption in many *.cab files
  • Regenerates the *.cab files in the c:\windows\logs folder
  • Turn on Windows module installer service
  • Turns on the Windows Update service
  1. To begin, click Start, type in “cmd” (no quotes); wait for “CMD.EXE” or “Command Prompt” to appear in the list, then right click and “Run as Administrator”.
     
  2. Use your mouse to highlight the text below:

    net stop wuauserv
    cd %systemroot%
    rename SoftwareDistribution SoftwareDistribution.old
    rmdir /q /s c:\windows\temp
    net stop trustedinstaller
    c:
    cd c:\windows\logs\CBS
    del *.cab
    del *.log
    rem regenerate cab files
    c:\windows\system32\wuauclt.exe /detectnow
    net start wuauserv
    echo this is a dummy line

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.