Batch Menus not setting variables
Posted: 19 Apr 2013 14:08
Try this on for size. First run through will not set the variable "wtf"
have it pausing so you can see example
but second run will set it
Also, try answering y to the first prompt, then just hitting enter at the next
seems like the first prompt will set it but not able to read it
WUT?????
have it pausing so you can see example
but second run will set it
Also, try answering y to the first prompt, then just hitting enter at the next
seems like the first prompt will set it but not able to read it
WUT?????
Code: Select all
set prdico=Y
set WTF=
:WIconprompt
IF "%prdico%"=="Y" (
Echo ==================================================
Echo Prod icon detected, would you like to install
Echo the "Schoolhouse" Icon for Non Production [Y/N]
Echo ==================================================
SET /P WTF=Please select [Y/N]
IF "%WTF%"=="Y" (
Set Return=END
GOTO WIiconNP
)
IF "%WTF%"=="y" (
Set Return=End
GOTO WIiconNP
)
IF "%WTF%"=="N" GOTO END
IF "%WTF%"=="n" GOTO END
echo WTF= %WTF%
echo oops
echo ===============================
echo Please select [Y/N]
echo ===============================
pause
GOTO WIconprompt
)
:WIiconNP
echo works
pause
:End
echo end
pause