Need some help with a menu
Posted: 21 Aug 2012 16:45
Hello all,
I'm having a bit of trouble getting my menu setup to work. When I select a choice, it just gives me the "Error. Please select a valid choice" text that I setup.
Can someone please tell me what's going wrong?
Thanks!
Here is a block of code that has the problem.
I'm having a bit of trouble getting my menu setup to work. When I select a choice, it just gives me the "Error. Please select a valid choice" text that I setup.
Can someone please tell me what's going wrong?
Thanks!
Here is a block of code that has the problem.
Code: Select all
:mainMenu
cls
echo ---Backup Manager----------
echo Version %VERSION%
echo.
echo.
echo Menu
echo ------
echo 1 View Current Backups
echo 2 Add a Backup
echo 3 Delete a Backup
echo 4 Legal
echo 5 Changelog
echo 6 Reinstall
echo Exit
echo.
set /p '%choice%'=(Please select an option)
if '%choice%'=='1' goto backupList
if '%choice%'=='2' goto backupAdd
if '%choice%'=='3' goto backupDelete
if '%choice%'=='4' goto legal
if '%choice%'=='5' goto changelog
if '%choice%'=='6' goto setup
echo Error, please select a valid choice.
pause>nul
goto mainMenu