@ECHO OFF&PUSHD %~DP0 &TITLE 绿化
taskkill /f /im BaiduYun*>NUL 2>NUL
rd/s/q "%AppData%\Baidu\BaiduYun"2>NUL
rd/s/q "%tmp%\bdyunguanjiaskinres"2>NUL
reg add HKCU\Software\Baidu\BaiduYun /v installDir /d "%~dp0\" /F>NUL
reg add HKLM\SOFTWARE\Baidu\BaiduYun /v installDir /d "%~dp0\" /F>NUL
if exist "%WinDir%\SysWOW64" reg add HKLM\SOFTWARE\Wow6432Node\Baidu\BaiduYun /v installDir /d "%~dp0\" /F>NUL
:Menu
echo.&echo +.创建桌面云同步盘
echo.&echo 1.注册浏览器网页上传控件
echo.&echo 2.注册右键同步分享项控件
echo.&echo.
set /p a= 输入数字回车：
if "%a%"=="+" Goto DesktopLnk
if "%a%"=="1" Goto AddUploader
if "%a%"=="2" Goto AddYunShell
:AddUploader
regsvr32 /s ieUploader.dll
regsvr32 /s npUploader.dll
SET E=完成!&GOTO MSGBOX
:AddYunShell
if exist "%WinDir%\SysWOW64" regsvr32 /s NetdiskExt64.dll
if not exist "%WinDir%\SysWOW64" regsvr32 /s NetdiskExt.dll
SET E=完成!&GOTO MSGBOX
:DesktopLnk
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\云同步盘.lnk""):b.TargetPath=""%~dp0baiduyun.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")&SET E=完成!&GOTO MSGBOX
:MsgBox
if "%1"=="" mshta VBScript:MsgBox("%e%",vbSystemModal,"")(close)& Cls&Goto Menu