@ECHO OFF & CD /D %~DP0 & TITLE 绿化
>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
)

taskkill /f /im QQMu*>NUL 2>NUL

regsvr32 /s QQMusic_Login.dll
regsvr32 /s TXSSO\Bin\SSOCommon.dll
regsvr32 /s TXSSO\Bin\SSOLUIControl.dll
regsvr32 /s TXSSO\Bin\npSSOAxCtrlForPTLogin.dll

start /wait /B "" "%~dp0QQMusicSvr.exe" /RegServer

if "%PROCESSOR_ARCHITECTURE%"=="x86" reg add HKLM\Software\Tencent\QQMusic /f /v Install /d "%CD%" >NUL
If "%PROCESSOR_ARCHITECTURE%"=="AMD64" reg add HKLM\Software\Wow6432Node\Tencent\QQMusic /f /v Install /d "%CD%" >NUL

ECHO.&ECHO 绿化完成！创建快捷方式？
ECHO.&ECHO 是按任意键，否直接关闭！&PAUSE >NUL 2>NUL & CLS

mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\QQ音乐.lnk""):b.TargetPath=""%~dp0QQMusic.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")

CLS&ECHO.&ECHO.创建完成！ &PAUSE >NUL 2>NUL & EXIT