Hello!

Monday, March 4th, 2013 by javadeveloper

Hello. I’m creating this site for questions about batch and much more. If you wanna see a preview of what we got so far on coding, here.

 

Code:

UserCreate:

@echo off
:begin1
echo Would you like to make an account?
set /p option1=
if %option1% == yes goto new
if not %option1% == yes exit
:new
set /p user= Username:
echo %user%>username.txt>Username
set /p pass= Password:
echo %pass%>password.txt>Encreption
cls
echo We have created your account. Go to Login.bat to login into your account.
pause
exit

 

Login:

 

@echo off
:begin1
cls
set /p password=< Encreption
set /p username=< Username
set /p loginp= Username:
if %loginp% == %username% goto pass
if not %loginp% == %username% goto exit1
:pass
set /p passp= Password:
if %passp% == %password% goto welcome
if not %passp% == %password% goto exit1
:welcome
cls
echo Welcome %username%!
pause
exit
:exit1
cls
echo Incorrect username/password.
pause
goto begin 

Thats it!

Advertisements

2 comments on “Hello!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: