@echo off
:start
cls
color 1f
MODE con: COLS=50 lines=15
echo.
ECHO     安装与卸载
echo.
ECHO     ========================================
ECHO     1. 安装
ECHO     2. 卸载
ECHO     ----------------------------------------
ECHO     3. 放弃并退出
ECHO     ========================================
SET Choice=
SET /P Choice=    请选择要进行的操作（1/2/3），然后按回车：
ECHO.
IF NOT '%Choice%'=='' SET Choice=%Choice:~0,1%
IF /I '%Choice%'=='1' GOTO Re
IF /I '%Choice%'=='2' GOTO Un
IF /I '%Choice%'=='3' GOTO End
GOTO Start

:Re
> "%Temp%.\DefOpen.reg" ECHO Windows Registry Editor Version 5.00
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CURRENT_USER\Software\ImageDupeless]
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CURRENT_USER\Software\ImageDupeless\ImageDupeless]
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CURRENT_USER\Software\ImageDupeless\ImageDupeless\ImageDupeless-Bar0]
>>"%Temp%.\DefOpen.reg" ECHO "BarID"=dword:0000e800
>>"%Temp%.\DefOpen.reg" ECHO "XPos"=dword:fffffffe
>>"%Temp%.\DefOpen.reg" ECHO "YPos"=dword:fffffffe
>>"%Temp%.\DefOpen.reg" ECHO "Docking"=dword:00000001
>>"%Temp%.\DefOpen.reg" ECHO "MRUDockID"=dword:00000000
>>"%Temp%.\DefOpen.reg" ECHO "MRUDockLeftPos"=dword:fffffffe
>>"%Temp%.\DefOpen.reg" ECHO "MRUDockTopPos"=dword:fffffffe
>>"%Temp%.\DefOpen.reg" ECHO "MRUDockRightPos"=dword:00000250
>>"%Temp%.\DefOpen.reg" ECHO "MRUDockBottomPos"=dword:0000002f
>>"%Temp%.\DefOpen.reg" ECHO "MRUFloatStyle"=dword:00002004
>>"%Temp%.\DefOpen.reg" ECHO "MRUFloatXPos"=dword:80000000
>>"%Temp%.\DefOpen.reg" ECHO "MRUFloatYPos"=dword:00000000
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CURRENT_USER\Software\ImageDupeless\ImageDupeless\ImageDupeless-Bar1]
>>"%Temp%.\DefOpen.reg" ECHO "BarID"=dword:0000e801
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CURRENT_USER\Software\ImageDupeless\ImageDupeless\ImageDupeless-Bar2]
>>"%Temp%.\DefOpen.reg" ECHO "BarID"=dword:0000e81b
>>"%Temp%.\DefOpen.reg" ECHO "Bars"=dword:00000003
>>"%Temp%.\DefOpen.reg" ECHO "Bar#0"=dword:00000000
>>"%Temp%.\DefOpen.reg" ECHO "Bar#1"=dword:0000e800
>>"%Temp%.\DefOpen.reg" ECHO "Bar#2"=dword:00000000
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CURRENT_USER\Software\ImageDupeless\ImageDupeless\ImageDupeless-Summary]
>>"%Temp%.\DefOpen.reg" ECHO "Bars"=dword:00000003
>>"%Temp%.\DefOpen.reg" ECHO "ScreenCX"=dword:00000556
>>"%Temp%.\DefOpen.reg" ECHO "ScreenCY"=dword:00000300
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CURRENT_USER\Software\ImageDupeless\ImageDupeless\Parameters]
>>"%Temp%.\DefOpen.reg" ECHO "Last PropSheet Index"=dword:00000006
>>"%Temp%.\DefOpen.reg" ECHO "Last Decoded File"=""
>>"%Temp%.\DefOpen.reg" ECHO "Collumn 0 width"=dword:00000163
>>"%Temp%.\DefOpen.reg" ECHO "Collumn 1 width"=dword:0000006a
>>"%Temp%.\DefOpen.reg" ECHO "Collumn 2 width"=dword:00000082
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CURRENT_USER\Software\ImageDupeless\ImageDupeless\Settings]
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CURRENT_USER\Software\ImageDupeless\ImageDupeless\TipOfTheDay]
>>"%Temp%.\DefOpen.reg" ECHO "TimeStamp"="Thu Dec 16 03:15:20 2004"
>>"%Temp%.\DefOpen.reg" ECHO "TipNo"=dword:00000001
>>"%Temp%.\DefOpen.reg" ECHO "StartUp"=dword:00000000
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CURRENT_USER\Software\ImageDupeless\ImageDupeless\Window size]
>>"%Temp%.\DefOpen.reg" ECHO "Rect"="0244 0069 0864 0529"
>>"%Temp%.\DefOpen.reg" ECHO "icon"=dword:00000000
>>"%Temp%.\DefOpen.reg" ECHO "max"=dword:00000000
>>"%Temp%.\DefOpen.reg" ECHO "Left win width"=dword:0000017c
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CURRENT_USER\Software\ImageDupeless\ImageDupelessENG]
>>"%Temp%.\DefOpen.reg" ECHO "key"="0Q05Eu0wlNpP4U3ZPr+1tC0XPNWFMbylN8MgCEoTec1TqXa/6Gm1z5sVy3+aNhfrg3OjXgwsCWxsnlwKRDKCRBfnt29qAWNTcVtF6TOOPhbpoPIwKrT+uzsfec1fm8CdkvnFBobY16W2cs0CNHdXDTe8xJ5RmPzjaMu5xxIy9tp4="
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO.
START /WAIT REGEDIT /S "%Temp%.\DefOpen.reg"
DEL "%Temp%.\DefOpen.reg"
cd /d "%~dp0"
start ImageDupeless.exe
goto End

:Un
reg delete "HKEY_CURRENT_USER\Software\ImageDupeless" /f
pause
goto End

:End
exit
