Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- echo FirstReg for ADCH++
- echo -------------------
- echo.
- echo Script for create the initial (admin) account for a new ADCH++ installation.
- echo.
- if not exist .\config goto notfound
- if exist .\adchppd.exe goto found
- :notfound
- echo This script must be run from the ADCH++ program folder...
- goto end
- :found
- echo *** !!!BEWARE!!! ***
- echo 1. Proceeding will result all the existing user registrations DELETED!!
- echo This script will (re)create the file %CD%\users.txt !!
- echo 2. The ADCH++ process should NOT be running to changes take effect.
- echo.
- set /p userinp=Are you sure to continue? Press 'Y' to proceed, any other key to exit :
- if "%userinp%"=="y" goto ok
- if "%userinp%"=="Y" goto ok
- goto end
- :ok
- echo.
- echo Enter the admin account information
- set /p USER=Username :
- set /p PWD=Password :
- set /p LEVEL=Admin user level :
- echo [{"password":"%PWD%","nick":"%USER%","level":%LEVEL%}] > .\config\users.txt || goto err
- echo Account successfully created.
- goto end
- :err
- echo Error trying to modify %CD%\users.txt
- :end
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement