@echo off
cls
:memu
echo 選單
echo ==============================
echo.
echo 1.安裝
echo.
echo 2.移除
echo.
echo 0.退出
echo.
echo ==============================
set /p NUM=輸入數位後按ENTER確認：
echo.
cls

if "%NUM%"=="1" if "%PROCESSOR_ARCHITECTURE%"=="x86" (goto I32)^
else if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (goto I64)
if "%NUM%"=="2" if "%PROCESSOR_ARCHITECTURE%"=="x86" (goto D32)^
else if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (goto D64)
if "%NUM%"=="0" (exit)

echo 輸入錯誤，請重新輸入。
echo.
goto memu

:I32
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Enterbrain\RGSS\RTP" /v "Standard" /d "%~dp0RGSS\Standard" /f
echo.
goto memu

:I64
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Enterbrain\RGSS\RTP" /v "Standard" /d "%~dp0RGSS\Standard" /f
echo.
goto memu

:D32
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Enterbrain" /f 
reg delete "HKEY_CURRENT_USER\SOFTWARE\Enterbrain" /f >NUL 2>NUL
echo.
goto memu

:D64
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Enterbrain" /f
reg delete "HKEY_CURRENT_USER\SOFTWARE\Enterbrain" /f >NUL 2>NUL
echo.
goto memu

