@echo off REM BATPass - Build 120922 - http://camoy.sdf.org/ REM Please keep this notice if you add this code to your scripts. Thank you. REM Replace all aterisks (*) with the number of characters you want you password to be. REM Replace all ampersands (&) with the desired password. REM ----------------------------------------------------------------------------------- REM If the password isn't good, send the user back to the prompt :start REM First we blank the "choice" variable set choice= REM Prompt for password set /p choice=Please enter password: REM Set up what the password is if not '%choice%'=='' set choice=%choice:~0,********************************% REM If the password is good, we start running code after "passgood" if '%choice%'=='&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&' goto passgood REM Notify user that password was incorrect echo. echo INCORRECT PASSWORD! echo Press a key to try again. pause > NUL cls REM Send user back to prompt goto start REM If the password was correct, jump to here and start running code. :passgood REM---(Your coding beyond this line here)---