@echo off
if exist "%SystemRoot%\SysWOW64" path %path%;%windir%\SysNative;%SystemRoot%\SysWOW64;%~dp0
bcdedit >nul
if '%errorlevel%' NEQ '0' (goto UACPrompt) else (goto UACAdmin)
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del /f /q "%temp%\getadmin.vbs" >nul
exit /B
:UACAdmin
cd /d "%~dp0"

echo ###################################
echo ###  MagicEXIF 1.09 1260  绿化  ###
echo ###         苏 紫 方 璇         ###
echo ###################################
echo.
echo.
echo 1、绿化
echo.
echo 2、卸载
echo.
echo.
:loop
 
set /p a=请选择:
 
if /i '%a%'=='1' goto lvhua
if /i '%a%'=='2' goto xiezai
echo 输入有误，请重新输入
goto loop
:lvhua

regsvr32 /s ConnService.dll
regsvr32 /s ExifCodec.dll

reg add "HKCU\Software\VB and VBA Program Settings\MagicEXIF\AppInfo" /v "ActivationCode" /d "CB67DEFCB67D55DEFCB67D55DEF7D55DCB67D55DEFCB67D55DEFCB67D55DEFDE" /f
reg add "HKCU\Software\VB and VBA Program Settings\MagicEXIF\AppInfo" /v "UserName" /d "苏紫方璇" /f
echo 绿化完成
pause
exit
:xiezai

regsvr32 /u ConnService.dll
regsvr32 /u ExifCodec.dll

reg delete "HKCU\Software\VB and VBA Program Settings\MagicEXIF" /f
echo 卸载完成
pause
exit

