@echo off
echo TheWorld7 Plus - 设置开机自动更新AdRules 
echo ---------------------------------------
echo 1、设置开机启动项
echo ---------------------------------------
echo 2、删除开机启动项
echo ---------------------------------------
echo 3、删除开机启动项并删除相关文件
echo ---------------------------------------
Set Choice=
Set /P Choice=请输入 1 或者 2 或者 3 之后按回车键。
If "%Choice%"=="1" Goto Set
If "%Choice%"=="2" Goto Del
If "%Choice%"=="3" Goto Delete
:Set
cd /d "%~dp0"
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "TheWorld6_AD_Rule_AutoUpdate" /d "%~dp0TheWorld6_AD_Rule_AutoUpdate.exe" /f
pause
exit
:Del
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "TheWorld6_AD_Rule_AutoUpdate" /f
pause
exit
:Delete
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "TheWorld6_AD_Rule_AutoUpdate" /f
del "%~dp0TheWorld6_AD_Rule_AutoUpdate.exe"
del "%~dp0TheWorld6_AD_Rule_AutoUpdate.ini"
pause
del %0
