(I\'ll use this script as an example)
@echo off :start cls set /p x=enter the password: if %x%==1 goto correct echo incorrect timeout 1 >nul /nobreak goto sta
Change this:
if %x%==1
To this:
if "%x%" EQU "1"
The quotes encase the variable so you always have a valid string to compare, then you have to do the same to what you're comparing it to for consistency. EQU is another way to compare strings (check out if /? for other operators).
EQU
if /?