@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 eCloud* /t >NUL 2>NUL
net stop e >NUL 2>NUL
sc delete e >NUL 2>NUL
rd/s/q "%temp%\ecloud"2>NUL
rd/s/q "%temp%\ecloudtemp"2>NUL
rd/s/q "%AppData%\ecloud"2>NUL
rd/s/q "%AppData%\eCloudUpgrade"2>NUL
del/q "%AppData%\Microsoft\Windows\Libraries\天翼云盘下载.library-ms" >NUL 2>NUL
reg delete "HKLM\SOFTWARE\ecloud" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\ecloud" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\*\shellex\ContextMenuHandlers\eDriveAppExt" /f >NUL 2>NUL
reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /f /v "eCloud.exe" >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /f /v "eCloud.exe" >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /f /v "eCloud.exe" /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\*\shellex\ContextMenuHandlers\eDriveAppExt" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\CLSID\{2008CAF4-A5C1-4037-99A8-699E4D01456D}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\CLSID\{20125792-F4EE-478D-81BE-2EE3E74EDFBB}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\CLSID\{397B0106-CBA6-411B-B118-05EEAC9FCE3E}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\CLSID\{6AEA62E7-E9BB-4992-8CFD-5C01C2A930D4}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\CLSID\{92ABD153-5CF6-4047-89AE-9092E5326841}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\CLSID\{B7A1FBB6-52CF-4360-84B5-1515F4A06165}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\CLSID\{FC71360F-A39A-4549-B9CA-07CF036495C0}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Directory\background\shellex\ContextMenuHandlers\eDriveAppExt" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Directory\shellex\ContextMenuHandlers\eDriveAppExt" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Directory\shellex\DragDropHandlers\eDriveAppExt" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Drive\shellex\ContextMenuHandlers\eDriveAppExt" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Drive\shellex\DragDropHandlers\eDriveAppExt" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\ECloudWeb" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Folder\shellex\ContextMenuHandlers\eDriveAppExt" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Folder\shellex\DragDropHandlers\eDriveAppExt" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\      eDriveAppExt1" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\      eDriveAppExt2" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\      eDriveAppExt3" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\      eDriveAppExt4" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\      eDriveAppExt5" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\      eDriveAppExt6" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\eCloud" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\eCloud" /f /reg:32 >NUL 2>NUL

ver|findstr "5\.[0-9]\.[0-9][0-9]*" > NUL && (
del/q "%UserProfile%\桌面\天翼云盘.lnk" >NUL 2>NUL
del/q "%AllUsersProfile%\桌面\天翼云盘.lnk" >NUL 2>NUL
rd/s/q "%UserProfile%\「开始」菜单\程序\天翼云盘"2>NUL
rd/s/q "%AllUsersProfile%\「开始」菜单\程序\天翼云盘"2>NUL
)
ver|findstr "\<6\.[0-9]\.[0-9][0-9]*\> \<10\.[0-9]\.[0-9][0-9]*\>" > NUL && (
del/q "%Public%\Desktop\天翼云盘.lnk" >NUL 2>NUL
del/q "%UserProfile%\Desktop\天翼云盘.lnk" >NUL 2>NUL
rd/s/q "%AppData%\Microsoft\Windows\Start Menu\Programs\天翼云盘"2>NUL
rd/s/q "%ProgramData%\Microsoft\Windows\Start Menu\Programs\天翼云盘"2>NUL
)

ECHO.&ECHO 完成 &TIMEOUT /t 3 >NUL&EXIT