How to make a register an account in batch -
is there way make account program making in batch? mean, there way log in specific username , password. there way create username , password , make batch file save , remember it, user can login next time instead of register?
hopefully can understand. thanks!
this solution create username , password , make batch file save in itself, requested, user can login next time instead of register.
@echo off setlocal set "username=" call :getuserpass if defined username goto login echo must register in order use program set /p "username=enter username: " set /p "password=enter password: " echo set "username=%username%" >> "%~f0" echo set "password=%password%" >> "%~f0" goto begin :baduserpass echo invalid username or password, try again :login set /p "user=enter username: " set /p "pass=enter password: " if "%user%" neq "%username%" goto baduserpass if "%pass%" neq "%password%" goto baduserpass :begin echo/ echo welcome program! goto :eof :getuserpass
Comments
Post a Comment