Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. @echo off
  2. echo FirstReg for ADCH++
  3. echo -------------------
  4. echo.
  5. echo Script for create the initial (admin) account for a new ADCH++ installation.
  6. echo.
  7.  
  8. if not exist .\config goto notfound
  9. if exist .\adchppd.exe goto found
  10.  
  11. :notfound
  12. echo This script must be run from the ADCH++ program folder...
  13. goto end
  14.  
  15. :found
  16. echo *** !!!BEWARE!!! ***
  17. echo 1. Proceeding will result all the existing user registrations DELETED!!
  18. echo This script will (re)create the file %CD%\users.txt !!
  19. echo 2. The ADCH++ process should NOT be running to changes take effect.
  20. echo.
  21. set /p userinp=Are you sure to continue? Press 'Y' to proceed, any other key to exit :
  22. if "%userinp%"=="y" goto ok
  23. if "%userinp%"=="Y" goto ok
  24. goto end
  25.  
  26. :ok
  27. echo.
  28. echo Enter the admin account information
  29. set /p USER=Username :
  30. set /p PWD=Password :
  31. set /p LEVEL=Admin user level :
  32.  
  33. echo [{"password":"%PWD%","nick":"%USER%","level":%LEVEL%}] > .\config\users.txt || goto err
  34.  
  35. echo Account successfully created.
  36. goto end
  37.  
  38. :err
  39. echo Error trying to modify %CD%\users.txt
  40.  
  41. :end
  42. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement