When running the following batch file for the first time through CMD I would expect it to print out correctbut instead it prints out error
@echo off
SET /p var1="Enter 1 "
IF "%var1%"=="1" (
SET /p var2="Enter 1 "
IF "%var2%"=="1" (
echo correct
) ELSE (
echo error
)
)
When running it again in the same CMD session it prints out correct every time afterwards. Am I missing something to make it print out correct the first time?