Error with the batch login -
i write program whitch reading login , password fille if both corect program should go next point.
:rejestracja cls set/p "uname=wpisz login : " set/p "upass=wpisz haslo : " cls goto rejestracja2 :haslo set/p "haslo=wpisz haslo : " if %haslo%==<<d:\upass.txt goto nowy if exist %haslo%==<<d:\upass.txt goto start :rejestracja2 echo %uname%>>d:\uname.txt echo %upass%>>d:\upass.txt attrib d:\uname.txt +h attrib d:\upass.txt +h cls goto login :login cls set /p login="wpisz login :" **if {%login%}=={<=d:\uname.txt} goto haslo** pause > nul
i need fix line when putted "**"
you can't read file "on fly".
read them variable first:
:login set /p login="wpisz login :" set /p uname=<d:\uname.txt if "%login%"=="%uname%" goto ...
same :haslo
in :rejestracja2
should use >
instead of >>
(overwrite instead of append)
Comments
Post a Comment