@ECHO OFF

cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && reg query "HKU\S-1-5-19" 1>nul 2>nul || (  cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && ""%~s0"" %Apply%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )

schtasks /delete /tn "IObitSelfCheckTask" /f >NUL 2>NUL
schtasks /delete /tn "SmartDefrag_Update" /f >NUL 2>NUL
schtasks /delete /tn "SmartDefrag_Startup" /f >NUL 2>NUL
schtasks /delete /tn "SmartDefrag_AutoAnalyze" /f >NUL 2>NUL

del/f/q "%AppData%\IObit\DriveDetection.ini">NUL 2>NUL 
rd/s/q "%AppData%\IObit\Smart Defrag"2>NUL
rd/s/q "%ProgramData%\ProductData"2>NUL
rd/s/q "%CommonProgramFiles%\IObit\Smart Defrag"2>NUL
rd/s/q "%CommonProgramW6432%\IObit\Smart Defrag"2>NUL
rd/s/q "%CommonProgramFiles(x86)%\IObit\Smart Defrag"2>NUL

regsvr32 /s /u "%WinDir%\System32\IObitSmartDefragExtension.dll"
del /f /q "%WinDir%\System32\IObitSmartDefragExtension.dll" /f >NUL 2>NUL 

reg delete "HKLM\SOFTWARE\IObit\Smart Defrag" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\WOW6432Node\IObit\Smart Defrag" /f >NUL 2>NUL

ECHO.&ECHO Íê³É &TIMEOUT /t 2 >NUL&EXIT