Advertisement
FadeMind

acronis-disable-active-protection.cmd

Aug 16th, 2022 (edited)
2,138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @ECHO OFF
  2. ::
  3. :: Acronis True Image disabling malware protection.
  4. ::
  5. :: Review 2022-10-02
  6. ::
  7. :: Check if we are an administrator. If not, exit immediately.
  8. :: BatchGotAdmin
  9. :: Check for permissions
  10. if "%PROCESSOR_ARCHITECTURE%" equ "amd64" (
  11.     >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
  12. ) else (
  13.     >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  14. )
  15.  
  16. :: If the error flag set, we do not have admin rights.
  17. if %ERRORLEVEL% neq 0 (
  18.     echo Requesting administrative privileges...
  19.     goto UACPrompt
  20. ) else (
  21.     goto gotAdmin
  22. )
  23.  
  24. :UACPrompt
  25. echo Set UAC = CreateObject^("Shell.Application"^) > "%TEMP%\getadmin.vbs"
  26. set params= %*
  27. echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%TEMP%\getadmin.vbs"
  28.  
  29. wscript.exe "%TEMP%\getadmin.vbs"
  30. del "%TEMP%\getadmin.vbs"
  31. exit /b
  32.  
  33. :gotAdmin
  34. cd /d "%~dp0"
  35.    
  36. :RMFLS
  37.  
  38. ren "%CommonProgramFiles(x86)%\Acronis\ActiveProtection\anti_ransomware_service.exe" "anti_ransomware_service.ex_"
  39. ren "%ProgramFiles%\Acronis\CyberProtect\cyber-protect-service.exe" "cyber-protect-service.ex_"
  40. ren "%ProgramFiles(x86)%\Acronis\Agent\bin\adp-agent.exe" "adp-agent.ex_"
  41. ren "%ProgramFiles(x86)%\Acronis\Agent\bin\adp-rest-util.exe" "adp-rest-util.ex_"
  42.  
  43. :: sc config "AcronisActiveProtectionService" start= disabled
  44. :: sc config "AcronisCyberProtectionService" start= disabled
  45. sc stop bddci
  46. sc delete bddci
  47. sc stop ngscan
  48. sc delete ngscan
  49. sc stop AcronisCyberProtectionService
  50. sc delete AcronisCyberProtectionService
  51. sc stop AcronisActiveProtectionService
  52. sc delete AcronisActiveProtectionService
  53. ::reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AcronisCyberProtectionService" /f
  54. ::reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AcronisActiveProtectionService" /f
  55. ::reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\bddci" /f
  56. ::reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ngscan" /f
  57. @PAUSE
  58.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement