@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 2345P* >NUL 2>NUL
start /wait 2345PicLoader.exe -preUninstall
start /wait 2345PicLoader.exe -uninstall

regsvr32 /s /u 2345ImageThumb.dll
regsvr32 /s /u 2345ImageThumb64.dll

rd /s/q "%TEMP%\2345Pic"2>NUL
rd /s/q "%AppData%\2345Pic"2>NUL
rd /s/q "%AppData%\Helper_2345"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 )


reg delete "HKLM\SOFTWARE\2345Pic" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\WOW6432Node\2345Pic" /f >NUL 2>NUL
reg delete "HKCU\Software\2345.com" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\2345PicViewer.exe" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\RegisteredApplications" /v "2345Pic" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\2345Pic" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\2345Pic" /f >NUL 2>NUL

CLS&ECHO.&ECHO 清除完成，删除软件?[敲1]
CHOICE /C 1 /N >NUL 2>NUL
IF "%ERRORLEVEL%"=="1" (
  DEL /F/Q "2345ImageThumb*.dll" >NUL 2>NUL
  IF EXIST 2345ImageThumb.dll ren 2345ImageThumb.dll "2345ImageThumb.dll.%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%.tmp" >NUL 2>NUL
  IF EXIST 2345ImageThumb64.dll ren 2345ImageThumb64.dll "2345ImageThumb64.dll.%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%.tmp" >NUL 2>NUL
  PUSHD .. & RD /S/Q "%~DP0" >NUL 2>NUL )