@ECHO OFF&PUSHD %~DP0 &TITLE 绿化卸载(小俊修改)
mode con cols=36 lines=20
color 2F
>NUL 2>&1 REG.exe query "HKU\S-1-5-19" || (
    ECHO SET UAC = CreateObject^("Shell.Application"^) > "%TEMP%\Getadmin.vbs"
    ECHO UAC.ShellExecute "%~f0", "%1", "", "runas", 1 >> "%TEMP%\Getadmin.vbs"
    "%TEMP%\Getadmin.vbs"
    DEL /f /q "%TEMP%\Getadmin.vbs" 2>NUL
    Exit /b
)
:Menu
Cls
@ echo.
@ echo.　　　　　 菜 单 选 项
@ echo.
@ echo.     绿化[必须] → 请输入1
@ echo.
@ echo.     创建桌面图标 → 请输入2
@ echo.
@ echo.     卸载 → 请输入3
@ echo.
set /p xj= 输入数字按回车：
if /i "%xj%"=="1" Goto Install
if /i "%xj%"=="2" Goto Establish
if /i "%xj%"=="3" Goto Uninstall
@ echo.
echo      选择无效，请重新输入
ping -n 2 127.1>nul 
goto menu
:Install
@ echo.
ECHO 　　　正在安装中..请稍等..
taskkill /f /im BingDict.exe>NUL 2>NUL
rd/s/q "%AppData%\BingDict"2>NUL
regsvr32 /s WordCapture\WCaptureX.dll
regsvr32 /s WordCapture\WMonitorX.dll
regsvr32 /s WordCapture\WCaptureMoz\plugins\npWCX.dll
if exist "%WinDir%\SysWOW64"regsvr32 /s WordCapture\WCaptureX_x64.dll
if exist "%WinDir%\SysWOW64"regsvr32 /s WordCapture\WMonitorX_x64.dll
reg add HKLM\Software\BingDict /v InstallPath /d "%~dp0\" /F>NUL
if exist "%WinDir%\SysWOW64" reg add HKLM\Software\Wow6432Node\BingDict /v InstallPath /d "%~dp0\" /F>NUL
goto menu
:Establish
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\必应词典.lnk""):b.TargetPath=""%~dp0BingDict.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")
goto menu
:Uninstall
@ echo.
echo 　　　正在卸载中..请稍等..
taskkill /f /im BingDict.exe>NUL 2>NUL
rd/s/q "%AppData%\BingDict"2>NUL
regsvr32 /s /u WordCapture\WCaptureX.dll
regsvr32 /s /u WordCapture\WMonitorX.dll
regsvr32 /s /u WordCapture\WCaptureMoz\plugins\npWCX.dll
if exist "%WinDir%\SysWOW64"regsvr32 /s /u WordCapture\WCaptureX_x64.dll
if exist "%WinDir%\SysWOW64"regsvr32 /s /u WordCapture\WMonitorX_x64.dll
reg delete HKCU\Software\Tencent\BingDict /F>NUL 2>NUL
reg delete HKLM\Software\Tencent\BingDict /F>NUL 2>NUL
del /f /q "%userprofile%"\Desktop\必应词典.lnk
del /f /q "%userprofile%"\桌面\必应词典.lnk
goto menu