check my work?

hjahmad

New Member
im putting together a few different scripts for work and am putting together a batch menu system to guide the user to the correct script needed however, im having trouble with some of the basic menu things, feel free to run the code to see what im talking about.
the trouble im having comes in the menus of checkmenu32, and checkmenu64 sections of the code, near the end. instead of using numbers to make the selection but they dont seem to work. a 'y' is going to be linked to one of the scripts and a 'n' should return to either the bit32menu or bit64menu. however, any 'n' selection instantly ends the script and i have no idea why. the menus in bit32menu and bit64menu return to the main menu just fine. i have tried putting pauses here and there trying to find where the script goes but i havent been able to find anything.

here is the code i got.
and thanks for the help

Code:
@echo off
echo.
echo.
:mainmenu
cls
echo.
echo Please Select Windows XP Version:
echo.
echo	1. 32 bit
echo	2. 62 bit
echo	3. Exit
echo.
set menu1=
set /p menu1=Enter Selection (1, 2, 3): 
echo.
if not '%menu1%'=='' set choice=%choice:~0,1%
if '%menu1%'=='1' goto bit32menu
if '%menu1%'=='2' goto bit64menu
if '%menu1%'=='3' goto End
::
echo.
echo.
echo "%menu1%" is Not a Valid Option - Please Try Again
echo.
pause
goto mainmenu
::

:End
exit
::

:bit32menu
cls
echo.
echo		Windows XP SP3 32-bit
echo.
echo Please Select Script or Option:
echo.
echo 1. File Permission Script
echo 2. Audit Script
echo 3. Return to Main Menu
echo 4. Exit 
echo.
set menu2=
set /p menu2=Enter Selection (1,2,3,4):
echo.
if not ;%menu2%'=='' set choice=%choice:~0,1%
if '%menu2%'=='1' goto *********************************************************
if '%menu2%'=='2' goto checkmenu32
if '%menu2%'=='3' goto mainmenu
if '%menu2%'=='4' goto End
::
echo.
echo.
echo "%menu2%" is Not a Valid Option - Please Try Again
echo.
pause
goto bit32menu
::

:bit64menu
cls
echo.
echo		Windows XP SP3 64-bit
echo.
echo Please Select Script or Option:
echo.
echo 1. File Permission Script
echo 2. File Audit Script
echo 3. Return to Main Menu
echo 4. Exit 
echo.
set menu3=
set /p menu3=Enter Selection (1,2,3,4):
echo.
if not ;%menu3%'=='' set choice=%choice:~0,1%
if '%menu3%'=='1' goto *********************************************************
if '%menu3%'=='2' goto checkmenu64
if '%menu3%'=='3' goto mainmenu
if '%menu3%'=='4' goto End
::
echo.
echo.
echo "%menu3%" is Not a Valid Option - Please Try Again
echo.
pause
goto bit64menu
::

:checkmenu32
cls
echo.
echo Before continuing to Audit Script...
set menu4=
set /p menu4=Have the File Permissions been set completly and error free? (y,n):
echo.
if not ;%menu4'=='' set choice=%choice:~0,1%
if '%menu4'=='y' goto **********************************************************
if '%menu4'=='n' goto bit32menu
::
echo.
echo.
echo "%menu4%" is Not a Valid Option - Please Try Again
echo.
pause
goto checkmenu32
::

:checkmenu64
cls
echo.
echo Before continuing to Audit Script...
set menu5=
set /p menu5=Have the File Permissions been set completly and error free? (y,n):
echo.
if not ;%menu5'=='' set choice=%choice:~0,1%
if '%menu5'=='y' goto **********************************************************
if '%menu5'=='n' goto bit64menu
::
echo.
echo.
echo "%menu5%" is Not a Valid Option - Please Try Again
echo.
pause
goto checkmenu64
::
 
Back
Top