What is wrong with my batch login?

November 19, 2010 at 08:33:01
Specs: Windows XP
@echo off

:Login1
set /P USERID=Enter your domain\userid:
if /I "%c%" EQU "101Chameleon" goto :Login2
GOTO: noLogin

:Login2
set /P PASSWORD=Enter your password:
if /I "%c%" EQU "asd123" goto :Login
GOTO: noLogin
cls

:Login
echo You have successfully logged in.

set /P LOGOUT=Would you like to log out? [Y/N]
if /I "%c%" EQU "Y" goto :Login1
if /I "%c%" EQU "N" goto :Login(still)
GOTO: Wrongkey

:Wrongkey
echo You did not press Y or N.
cls
set /P WRONGKEY=Would you like to log out? [Y/N]
if /I "%c%" EQU "Y" goto :Login1
if /I "%c%" EQU "N" goto :Login(still)
GOTO: Wrongkey

:Login(still)
echo You are still logged in.

:noLogin
echo You didn't type the username right. :(
PAUSE

:noLogin1
echo You didn't type the password right. :(
PAUSE


See More: What is wrong with my batch login?

Report •


#1
November 19, 2010 at 08:33:26
What's wrong with it?

Report •

#2
November 19, 2010 at 08:52:00
where is the %C%variable,and also do not use ( ) in Lables.

Subhash Chandra.


Report •

#3
November 23, 2010 at 12:37:43
Ok, thanks!

Report •
Related Solutions


Ask Question