[AppleScript] 纯文本查看 复制代码 :: -i : uninstall before install, do not delete domaincfg.ini
echo off
taskkill /F /IM AliHips.exe
"C:\Program Files (x86)\Alibaba\Aegis\AliHips\AliHips.exe" --stopdriver
tasklist /FI "IMAGENAME eq Ali_update.exe"
taskkill /F /IM Ali_update.exe
taskkill /F /IM AliHids.exe
taskkill /F /IM AliYunDun.exe
taskkill /F /IM AliYunDunUpdate.exe
taskkill /F /IM AliYunDunMonitor.exe
taskkill /F /IM AliSecGuard.exe
taskkill /F /IM AliNetFilter.exe
taskkill /F /IM AliDetect.exe
taskkill /F /IM AliScriptEngine.exe
sc stop "Alibaba Security Aegis Detect Service"
sc stop "Alibaba Security Aegis Update Service"
sc delete "Alibaba Security Aegis Detect Service"
sc delete "Alibaba Security Aegis Update Service"
"C:\Program Files (x86)\Alibaba\Aegis\AliNet\AliNetFilter.exe" --stopdriver
"C:\Program Files (x86)\Alibaba\Aegis\AliSecGuard\AliSecGuard.exe" --stopdriver
rmdir /s /q "C:\Program Files (x86)\Alibaba\Aegis\aegis_client"
rmdir /s /q "C:\Program Files\Alibaba\Aegis\aegis_client"
timeout 3 > NUL
rmdir /s /q "C:\Program Files (x86)\Alibaba\Aegis\aegis_client"
rmdir /s /q "C:\Program Files\Alibaba\Aegis\aegis_client"
rmdir /s /q "C:\Program Files (x86)\Alibaba\Aegis\aegis_update"
rmdir /s /q "C:\Program Files\Alibaba\Aegis\aegis_update"
rmdir /s /q "C:\Program Files (x86)\Alibaba\Aegis\alihids"
rmdir /s /q "C:\Program Files\Alibaba\Aegis\alihids"
del /f "C:\Windows\temp\singleApp_aegisClient"
del /f "C:\Windows\temp\single_app_yun_dun_monitor"
if not "%1" == "-i" (
del /f "C:\Program Files\Alibaba\Aegis\globalcfg\domaincfg.ini"
del /f "C:\Program Files (x86)\Alibaba\Aegis\globalcfg\domaincfg.ini"
) else (
exit /b
)
if "%1" == "" (
exit /b
)
::wait aegis exit
echo "begin to wait AliYunDun.exe exit"
timeout 30 > NUL
tasklist|find /i "AliYunDun.exe"
if %errorlevel% == 0 (
echo "wait AliYunDun.exe exit fail"
exit /b
)
::Invoke-WebRequest is supported from powershell 3.0, so server 2008 and below is not support
set uuid=%1
powershell -executionpolicy bypass -c "Invoke-WebRequest -Uri [url]https://update.aegis.aliyun.com/update[/url] -Method POST -ContentType 'application/json' -Body '{\"version\": 4,\"data\": {\"uuid\": \"%uuid%\", \"type\": \"uninstall\"}}'"
|