@ECHO OFF&PUSHD %~DP0 &TITLE 绿化
Rd "%WinDir%\system32\test_permissions" >NUL 2>NUL
Md "%WinDir%\System32\test_permissions" 2>NUL||(Echo 请使用右键管理员身份运行！&&Pause >nul&&Exit)
Rd "%WinDir%\System32\test_permissions" 2>NUL
SetLocal EnableDelayedExpansion
:Menu
echo.&echo +.创建桌面云管家
echo.&echo 1.注册浏览器加速下载控件
echo.&echo 2.注册右键上传备份项控件
echo.&echo.
set /p a=输入数字回车：
IF NOT "%a%"=="" SET a=%a:~0,1%
if "%a%"=="+" Goto DesktopLnk
if "%a%"=="1" Goto AddWebDetect
if "%a%"=="2" Goto AddYunShell
echo.&echo 输入无效，请重新输入！ 
PAUSE >NUL && CLS && GOTO Menu
:AddWebDetect
regsvr32 /s npYunWebDetect.dll
ECHO.&ECHO 注册完成，任意键返回！&PAUSE >NUL && CLS && GOTO MENU
:AddYunShell
if exist "%WinDir%\SysWOW64" regsvr32 /s YunShellExt64.dll
if not exist "%WinDir%\SysWOW64" regsvr32 /s YunShellExt.dll
ECHO.&ECHO 注册完成，任意键返回！&PAUSE >NUL && CLS && GOTO MENU
:DesktopLnk
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\云管家.lnk""):b.TargetPath=""%~dp0BaiduYunGuanjia.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")
ECHO.&ECHO 创建完成，任意键返回！&PAUSE >NUL && CLS && GOTO MENU