@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
taskkill /f /im BaiduYun.exe >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
if exist "%WinDir%\SysWOW64" regsvr32 /s NetdiskExt64.dll
if not exist "%WinDir%\SysWOW64" regsvr32 /s NetdiskExt.dll
ECHO.&ECHO.完成! 是否创建桌面快捷方式？
ECHO.&ECHO.是请按任意键，否就直接关闭！&PAUSE >NUL 2>NUL
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")
CLS&ECHO.&ECHO.创建完成! &PAUSE >NUL 2>NUL & EXIT