Advertisement
talama

User Cleanup

May 7th, 2017
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.94 KB | None | 0 0
  1. @echo off
  2. if %os%==Windows_NT goto WINNT
  3. goto NOCON
  4.  
  5. :WINNT
  6. echo .Using a Windows NT based system
  7. echo ..%computername%
  8.  
  9. echo Deleting Temporary Internet Files
  10. del /q /f /s "%USERPROFILE%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*"
  11. echo deleted!
  12.  
  13. echo Deleting Downloads Folder Files
  14. del /q /f /s "%USERPROFILE%\Downloads\*.*"
  15. echo deleted!
  16.  
  17. echo Deleting Cookies
  18. del /q /f /s "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Cookies\*.*"
  19. del /q /f /s "%USERPROFILE%\AppData\LocalLow\Microsoft\Internet Explorer\DOMStore\*.*"
  20. echo deleted!
  21.  
  22. echo Deleting History
  23. del /q /f /s "%USERPROFILE%\AppData\Local\Microsoft\Windows\History\*.*"
  24. del /q /f /s "%USERPROFILE%\AppData\Local\Microsoft\Internet Explorer\Recovery\Active\*.*"
  25. del /q /f /s "%USERPROFILE%\AppData\Local\Microsoft\Internet Explorer\Recovery\Last Active\*.*"
  26. echo deleted!
  27.  
  28. echo Deleting Windows Internet Explorer Dat Files
  29. del /q /f /s "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\PrivacIE\*.*"
  30. del /q /f /s "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\IECompatCache\*.*"
  31. del /q /f /s "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\IETldCache\*.*"
  32. echo deleted!
  33.  
  34. echo Deleting Windows Error Reporting Files
  35. del /q /f /s "%USERPROFILE%\AppData\Local\Microsoft\Windows\WER\ReportArchive\*.*"
  36. echo deleted!
  37.  
  38. echo Deleting Flash Player Temp Files
  39. del /q /f /s "%USERPROFILE%\AppData\Roaming\Macromedia\Flash Player\*.*"
  40. echo deleted!
  41.  
  42. echo Deleting Remote Desktop Cache
  43. del /q /f /s "%USERPROFILE%\AppData\Local\Microsoft\Terminal Server Client\Cache\*.*"
  44. echo deleted!
  45.  
  46. echo Deleting Profile Temp Files
  47. del /q /f /s "%USERPROFILE%\AppData\Local\Temp\*.*"
  48. echo deleted!
  49.  
  50. echo Delete misc Files in Profile
  51. del /q /f /s "%USERPROFILE%\webct_upload_applet.properties"
  52. del /q /f /s "%USERPROFILE%\g2mdlhlpx.exe"
  53. del /q /f /s "%USERPROFILE%\fred"
  54. rmdir /s /q "%USERPROFILE%\temp"
  55. rmdir /s /q "%USERPROFILE%\WebEx"
  56. rmdir /s /q "%USERPROFILE%\.gimp-2.4"
  57. rmdir /s /q "%USERPROFILE%\.realobjects"
  58. rmdir /s /q "%USERPROFILE%\.thumbnails"
  59. rmdir /s /q "%USERPROFILE%\Bluetooth Software"
  60. rmdir /s /q "%USERPROFILE%\Office Genuine Advantage"
  61. echo deleted!
  62.  
  63. echo Deleting FireFox Cache
  64.  
  65. pushd "%USERPROFILE%\AppData\Local\Mozilla\Firefox\Profiles\*.default\"
  66. del /q /f /s "Cache\*.*"
  67. popd
  68.  
  69. echo deleted!
  70.  
  71. echo Deleting User Profile Adobe Temp Files
  72. del /q /f /s "%USERPROFILE%\AppData\LocalLow\Adobe\Acrobat\9.0\Search\*.*"
  73. del /q /f /s "%USERPROFILE%\AppData\LocalLow\Adobe\Common\Media Cache Files\*.*"
  74. del /q /f /s "%USERPROFILE%\AppData\LocalLow\Adobe\Common\Media Cache\*.*"
  75. echo deleted!
  76.  
  77. echo Deleting User Office Recent Files
  78. del /q /f /s "%USERPROFILE%\AppData\Roaming\Microsoft\Office\Recent\*.*"
  79. echo deleted!
  80.  
  81. echo Deleting User Office TMP Files
  82. del /q /f /s "%USERPROFILE%\AppData\Roaming\Microsoft\Office\*.tmp"
  83. echo deleted!
  84.  
  85. goto END
  86.  
  87. :NOCON
  88. echo Error...Invalid Operating System...
  89. echo Error...No actions were made...
  90. goto END
  91.  
  92. :END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement