@ECHO OFF&(PUSHD "%~DP0")&(REG QUERY "HKU\S-1-5-19">NUL 2>&1)||(
powershell -Command "Start-Process '%~sdpnx0' -Verb RunAs"&&EXIT)

taskkill /f /im chrome* /t >NUL 2>NUL
taskkill /f /im 360FeedBack.exe >NUL 2>NUL
taskkill /f /im 360Chrome.exe >NUL 2>NUL
taskkill /f /im 360ChromeX.exe >NUL 2>NUL
taskkill /f /im 360chromeie.exe >NUL 2>NUL
taskkill /f /im 360Loader.exe >NUL 2>NUL
taskkill /f /im 360ceupdate.exe >NUL 2>NUL

rd/s/q "%ProgramData%\360ChromeX"2>NUL
rd/s/q "%LocalAppData%\360ChromeX"2>NUL
del/q "%Public%\Desktop\360ChromeX.lnk" >NUL 2>NUL
del/q "%UserProfile%\Desktop\360ChromeX.lnk" >NUL 2>NUL
rd/s/q "%AppData%\Microsoft\Windows\Start Menu\Programs\360ChromeX"2>NUL
rd/s/q "%ProgramData%\Microsoft\Windows\Start Menu\Programs\360ChromeX"2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\360ChromeX" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\360ChromeX" /f /reg:32 >NUL 2>NUL

reg delete "HKCR\360ChromeXPDF" /f >NUL 2>NUL
reg delete "HKCR\360ChromeXURL" /f >NUL 2>NUL
reg delete "HKCU\SOFTWARE\360ChromeX" /f >NUL 2>NUL
reg delete "HKCU\SOFTWARE\Classes\360ChromeXPDF" /f >NUL 2>NUL
reg delete "HKCU\SOFTWARE\Classes\360ChromeXURL" /f >NUL 2>NUL
reg delete "HKCU\SOFTWARE\Clients\StartMenuInternet\360ChromeX" /f >NUL 2>NUL
reg delete "HKCU\SOFTWARE\Classes\CLSID\{0002DF01-0000-0000-C000-000000000046}" /f >NUL 2>NUL
reg delete "HKCU\SOFTWARE\Classes\CLSID\{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}" /f >NUL 2>NUL
reg delete "HKCU\SOFTWARE\Classes\WOW6432Node\CLSID\{0002DF01-0000-0000-C000-000000000046}" /f >NUL 2>NUL
reg delete "HKCU\SOFTWARE\Classes\WOW6432Node\CLSID\{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}" /f >NUL 2>NUL


CLS
ECHO.&ECHO 清除完成，确认删除？
ECHO.&ECHO 1、删除软件保留用户数据
ECHO.&ECHO 2、删除软件以及用户数据

CHOICE /C 12 /N >NUL 2>NUL

IF "%ERRORLEVEL%"=="2" ( PUSHD .. >NUL 2>NUL & RD /S/Q "%~DP0" >NUL 2>NUL )
  
IF "%ERRORLEVEL%"=="1" (
  IF EXIST "User Data" (
    FOR /F "delims=*" %%a IN ('dir /a/b *.*^|findstr /v /i "User Data$"') DO (
    RD /S/Q "%%a" >NUL 2>NUL & DEL /F/Q "%%a" >NUL 2>NUL)
    ) ELSE (
    PUSHD .. >NUL 2>NUL & RD /S/Q "%~DP0" >NUL 2>NUL ))