Batch File Help Needed Please Help

May 3, 2011 at 18:45:36
Specs: Windows XP, 1gb
ok i need to edit this script

@echo off
title testing authentication
color 0A
:MAIN
cls
echo.
echo Enter your username
echo.
set /p "username= > "
if %username%==robert goto PASSWORD
goto ERROR1
:ERROR1
echo.
echo The username was not found, please try again.
echo.
pause
goto MAIN
:PASSWORD
cls
echo.
echo Enter your password
echo.
set /p "password= > "
if %password%==2550020 goto OK
goto ERROR2
:ERROR2
echo.
echo The password is incorrect, please try again.
echo.
pause
goto PASSWORD
:OK
cls

where it says
if %username%==robert goto password
and
if %password%==2550020 goto ok

well i want the username robert and the password to be able to be changed at any time. is there a way to change the username and password from within the batch file. like some kind of script i can put into it to change it.


See More: Batch File Help Needed Please Help

Report •


#1
May 6, 2011 at 15:18:29
My magical username is:

""=="" goto ok & echo.

Enter it at the username prompt and it will goto "ok" without even asking for a password.

This isn't finished yet, but it is relevant:
http://judago.webs.com/setpvalidati...


Report •
Related Solutions


Ask Question