Batch file menu problem????

October 17, 2011 at 14:21:43
Specs: Windows 7
I am trying to make a program in BATCH, but the menu I made just closes once I start it. Is there a way to fix this? Here's the Code:
:start
echo _________________________________________________________
echo
echo
echo
echo
echo %logname%
echo GAMER 0$
echo
echo ======___________________________________________________
echo START
echo _________________________________________________________
echo.
set /p c1=
if %c1%==start goto main
echo ????
pause
cls
goto start

:main
echo _________________________________________________________
echo
echo
echo
echo|Logout(3)|
echo| DEF.(2)| %logname% GAMER 0$
echo| cls (1)|
echo ======___________________________________________________
echo START
echo _________________________________________________________
echo.
set /p c2=
if %c2%==2 goto def

:def
echo test
pause
cls
goto start

Thank you for all answewrs


See More: Batch file menu problem????

Report •


#1
October 17, 2011 at 14:55:21
What are you trying to do with this script?

Report •

#2
October 17, 2011 at 23:58:14
Line 8: "echo GAMER 0$"

The dollar sign is a special character, and has to be escaped with '^'.
echo GAMER 0^$

What is variable '%logname%' containing? This is not your whole script?

If your not sure that variables are present, use a dot after an echo.
Like:

echo. %logname%

Regards,

Happy is ONE who says I am an OttoMAN.


Report •
Related Solutions


Ask Question