husain12121

Browser Cache Clear

Jan 24th, 2021
971
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. @echo off
  3.  
  4. :: BatchGotAdmin
  5. :-------------------------------------
  6. REM  --> Check for permissions
  7.     IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
  8. >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
  9. ) ELSE (
  10. >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  11. )
  12.  
  13. REM --> If error flag set, we do not have admin.
  14. if '%errorlevel%' NEQ '0' (
  15.     echo Requesting administrative privileges...
  16.     goto UACPrompt
  17. ) else ( goto gotAdmin )
  18.  
  19. :UACPrompt
  20.     echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  21.     set params= %*
  22.     echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"
  23.  
  24.    "%temp%\getadmin.vbs"
  25.    del "%temp%\getadmin.vbs"
  26.    exit /B
  27.  
  28. :gotAdmin
  29.    pushd "%CD%"
  30.    CD /D "%~dp0"
  31. :--------------------------------------    
  32.     echo Starting CLEAR CACHE BY ALI SORATHIYA ...
  33.  
  34.  
  35.  
  36.  
  37. @rem Clear IE cache -  (Deletes Temporary Internet Files Only)
  38. RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
  39. erase "%LOCALAPPDATA%\Microsoft\Windows\Tempor~1\*.*" /f /s /q
  40. for /D %%i in ("%LOCALAPPDATA%\Microsoft\Windows\Tempor~1\*") do RD /S /Q "%%i"
  41.  
  42. @rem Clear Google Chrome cache
  43. erase "%LOCALAPPDATA%\Google\Chrome\User Data\*.*" /f /s /q
  44. for /D %%i in ("%LOCALAPPDATA%\Google\Chrome\User Data\*") do RD /S /Q "%%i"
  45.  
  46.  
  47. @rem Clear Firefox cache
  48. erase "%LOCALAPPDATA%\Mozilla\Firefox\Profiles\*.*" /f /s /q
  49. for /D %%i in ("%LOCALAPPDATA%\Mozilla\Firefox\Profiles\*") do RD /S /Q "%%i"
  50.  
  51.  
  52.  
  53.  
  54.  
  55. rd /s/q C:\$Recycle.bin
  56.  
  57. del /q/s/f %temp%\*
  58.  
  59. del /s /f /q %userprofile%\Recent\*.*
  60.  
  61. del /s /f /q C:\Windows\Prefetch\*.*
  62.  
  63. del /s /f /q C:\Windows\Temp\*.*
  64.  
  65. del /s /f /q %USERPROFILE%\appdata\local\temp\*.*
  66.  
  67. rd /s /q c:\$Recycle.Bin
  68.  
  69.  
  70.  
  71. del /s /f /q c:\windows\temp\*.*
  72. del /s /f /q C:\WINDOWS\Prefetch
  73. del /s /f /q %temp%\*.*
  74. deltree /y c:\windows\tempor~1
  75. deltree /y c:\windows\temp
  76. deltree /y c:\windows\tmp
  77. deltree /y c:\windows\ff*.tmp
  78. deltree /y c:\windows\history
  79. deltree /y c:\windows\cookies
  80. deltree /y c:\windows\recent
  81. deltree /y c:\windows\spool\printers
  82.  
  83.  
  84. del /s /f /q %windir%\temp\*.*    
  85. rd /s /q %windir%\temp    
  86. md %windir%\temp    
  87. del /s /f /q %windir%\Prefetch\*.*    
  88. rd /s /q %windir%\Prefetch    
  89. md %windir%\Prefetch    
  90. del /s /f /q %windir%\system32\dllcache\*.*    
  91. rd /s /q %windir%\system32\dllcache    
  92. md %windir%\system32\dllcache    
  93. del /s /f /q "%SysteDrive%\Temp"\*.*    
  94. rd /s /q "%SysteDrive%\Temp"    
  95. md "%SysteDrive%\Temp"    
  96. del /s /f /q %temp%\*.*    
  97. rd /s /q %temp%    
  98. md %temp%    
  99. del /s /f /q "%USERPROFILE%\Local Settings\History"\*.*    
  100. rd /s /q "%USERPROFILE%\Local Settings\History"    
  101. md "%USERPROFILE%\Local Settings\History"    
  102. del /s /f /q "%USERPROFILE%\Local Settings\Temporary Internet Files"\*.*    
  103. rd /s /q "%USERPROFILE%\Local Settings\Temporary Internet Files"    
  104. md "%USERPROFILE%\Local Settings\Temporary Internet Files"    
  105. del /s /f /q "%USERPROFILE%\Local Settings\Temp"\*.*    
  106. rd /s /q "%USERPROFILE%\Local Settings\Temp"    
  107. md "%USERPROFILE%\Local Settings\Temp"    
  108. del /s /f /q "%USERPROFILE%\Recent"\*.*    
  109. rd /s /q "%USERPROFILE%\Recent"    
  110. md "%USERPROFILE%\Recent"    
  111. del /s /f /q "%USERPROFILE%\Cookies"\*.*    
  112. rd /s /q "%USERPROFILE%\Cookies"    
  113. md "%USERPROFILE%\Cookies"
  114.  
  115. erase "%TEMP%\*.*" /f /s /q
  116. for /D %%i in ("%TEMP%\*") do RD /S /Q "%%i"
  117.  
  118. erase "%TMP%\*.*" /f /s /q
  119. for /D %%i in ("%TMP%\*") do RD /S /Q "%%i"
  120.  
  121. erase "%ALLUSERSPROFILE%\TEMP\*.*" /f /s /q
  122. for /D %%i in ("%ALLUSERSPROFILE%\TEMP\*") do RD /S /Q "%%i"
  123.  
  124. erase "%SystemRoot%\TEMP\*.*" /f /s /q
  125. for /D %%i in ("%SystemRoot%\TEMP\*") do RD /S /Q "%%i"
  126.  
  127.  
RAW Paste Data