Advertisement
Vanfear

Skype AdBlocker v4

Nov 9th, 2016
996
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.96 KB | None | 0 0
  1. @echo off
  2. title Skype AdBlocker v4
  3. mode con cols=52 lines=5
  4. color 2f
  5. echo.
  6. echo.
  7. echo.            Please wait. Processing...
  8. set x=x64
  9. if %processor_architecture%==x86 if not defined processor_architew6432 set x=x86
  10. if %x%==x64 (%windir%\Sysnative\cmd.exe /q /c "%~dp0sav4.bat") else (%windir%\System32\cmd.exe /q /c "%~dp0sav4.bat")
  11. exit 0
  12.  
  13. set h=%windir%\System32\Drivers\etc\hosts
  14. set r=%windir%\System32\Drivers\etc\saber.tmp
  15. set l="%~dp0hosts.txt"
  16. set f="%~dp0far.exe" -i -o
  17. set d=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\skype.com
  18. set k=127
  19. ver | findstr.exe /l /i /c:5.1 > nul
  20. if %errorlevel%==0 (set k=::)
  21. tasklist.exe | findstr.exe /l /i /c:Skype.exe > nul
  22. if %errorlevel%==0 (
  23. for /f "delims=" %%i in ('wmic.exe process where "name="Skype.exe"" get executablepath ^| findstr.exe /l /i /c:Skype.exe') do (
  24. set s=%%i)) & (taskkill.exe /f /im Skype.exe > nul)
  25. tasklist.exe | findstr.exe /l /i /c:saber-deact.exe > nul
  26. if %errorlevel%==0 (goto x)
  27. if not exist %h% (type nul > %h%) 2> nul & (goto e)
  28. findstr.exe /b /r /i /v /c:^$ /c:%k% /g:%h% %l% > nul
  29. if not %errorlevel%==0 (goto a)
  30. attrib.exe -r -s -h %h% > nul
  31. for %%b in (%h%) do (if not %%~zb==0 (
  32. echo f | xcopy.exe %h% "%h% backup [Skype AdBlocker].txt" /q /h /o /y > nul))
  33. echo f | xcopy.exe %h% %r% /q /h /o /y > nul
  34. :e
  35. findstr.exe /b /l /i /v /c:%k% /g:%h% %l%>> %r% 2> nul
  36. move /y %r% %h% > nul 2> nul
  37. if not %errorlevel%==0 (del /f /q "%h% backup [Skype AdBlocker].txt" > nul 2> nul) & (del /f /q %r% > nul 2> nul)
  38. attrib.exe +r %h% > nul
  39. :a
  40. reg.exe add "%d%\a.config" /v "*" /t REG_DWORD /d 4 /f > nul
  41. reg.exe add "%d%\apps" /v "*" /t REG_DWORD /d 4 /f > nul
  42. reg.exe add "%d%\b.config" /v "*" /t REG_DWORD /d 4 /f > nul
  43. reg.exe add "%d%\pipe" /v "*" /t REG_DWORD /d 4 /f > nul
  44. dir "%appdata%\Skype" /a-d /b /s 2> nul | findstr.exe /l /i /c:config.xml > nul
  45. if %errorlevel%==0 (for /f "delims=" %%a in ('dir "%appdata%\Skype" /a-d /b /s ^| findstr.exe /l /i /c:config.xml') do (
  46. %f% "%%a" "%%a" "Promo>0</Disable" "Promo>1</Disable") & (
  47. %f% "%%a" "%%a" "Tip>0</Disable" "Tip>1</Disable") & (
  48. %f% "%%a" "%%a" "Enabled>1</Advert" "Enabled>0</Advert") & (
  49. %f% "%%a" "%%a" "Placeholder>1</Advert" "Placeholder>0</Advert"))
  50. ipconfig.exe /flushdns > nul
  51. if exist "%s%" (start "" "%s%")
  52. exit 0
  53. :x
  54. if not exist %h% (goto v)
  55. for %%b in (%h%) do (if %%~zb==0 (goto v))
  56. findstr.exe /b /l /i /x /g:%l% %h% > nul
  57. if not %errorlevel%==0 (goto v)
  58. attrib.exe -r -s -h %h% > nul
  59. echo f | xcopy.exe %h% "%h% backup [Skype AdBlocker].txt" /q /h /o /y > nul
  60. type nul > %r%
  61. findstr.exe /b /l /i /v /g:%l% %h%>> %r%
  62. move /y %r% %h% > nul 2> nul
  63. if not %errorlevel%==0 (del /f /q "%h% backup [Skype AdBlocker].txt" > nul 2> nul) & (del /f /q %r% > nul 2> nul)
  64. attrib.exe +r %h% > nul
  65. :v
  66. reg.exe delete "%d%" /f > nul 2> nul
  67. ipconfig.exe /flushdns > nul
  68. if exist "%s%" (start "" "%s%")
  69. exit 0
  70.  
  71. https://toolslib.net/downloads/viewdownload/175-skype-adblocker/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement