@ECHO OFF&(PUSHD "%~DP0")&(REG QUERY "HKU\S-1-5-19">NUL 2>&1)||(
powershell -Command "Start-Process '%~sdpnx0' -Verb RunAs"&&EXIT)

:: 注册信息
reg add "HKCU\Software\TGRMN Software\Bulk Rename Utility" /f /v "key" /d "144-093-278bru-2060k" >NUL 2>NUL
reg add "HKCU\Software\TGRMN Software\Bulk Rename Utility" /f /v "name" /d "Popeyes~XU/TeamURET" >NUL 2>NUL
reg add "HKLM\SOFTWARE\TGRMN Software\Bulk Rename Utility" /f /v "key" /d "144-093-278bru-2060k" >NUL 2>NUL
reg add "HKLM\SOFTWARE\TGRMN Software\Bulk Rename Utility" /f /v "name" /d "Popeyes~XU/TeamURET" >NUL 2>NUL
reg add "HKCU\Software\TGRMN Software\Bulk Rename Utility\Settings" /f /v "firstrun" /t REG_DWORD /d "0" >NUL 2>NUL
reg add "HKLM\Software\TGRMN Software\Bulk Rename Utility\Settings" /f /v "firstrun" /t REG_DWORD /d "0" >NUL 2>NUL

:Begin
Echo.&Echo 添加激活信息完成，以下自选：
Echo.&Echo 1、添加文件夹右键菜单 Bulk Rename Utility
Echo.&Echo 2、删除文件夹右键菜单 Bulk Rename Utility

CHOICE /C 12 /N >NUL 2>NUL

if "%errorlevel%"=="2" (
IF NOT EXIST "%ProgramW6432%" (
  regsvr32 /s /u BRUHere.dll
) ELSE (
  regsvr32 /s /u BRUHere64.dll
)
reg delete "HKCU\Software\TGRMN Software" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\TGRMN Software" /f >NUL 2>NUL
ECHO.&ECHO 删除完成 & TIMEOUT /t 1 >NUL&CLS&GOTO Begin
)

if "%errorlevel%"=="1" (
IF NOT EXIST "%ProgramW6432%" (
  regsvr32 /s BRUHere.dll
) ELSE (
  regsvr32 /s BRUHere64.dll
)
ECHO.&ECHO 添加完成 & TIMEOUT /t 1 >NUL&CLS&GOTO Begin
)