Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I am developing a Batch file to accept values at the the ime of execution and then call respective batch files based on the input given by the user, I actually u have developed a small script to do this, but when i execute it, the batch file halts to accept value but doesn't respond to any key but ^Z for termination of batch process. I am attaching below the script I have written:
@echo off
cls
echo 1. Upgrade Existing 1
echo 2. Upgrade Existing 2
echo 3. Apply all patches
echo 4. Quitecho Choose your selection
echo.:choice
set /p choice=[1,2,3,4]?if /I "%choice%"=="1" goto patch60_601
if /I "%choice%"=="2" goto patch601
if /I "%choice%"=="3" goto patch522_60_601
if /I "%choice%"=="4" goto end
goto choice:patch60_601
@echo installing SRM52RCK Patch
@echo:
call 522\SRM52RCKPatch.batgoto end
:patch601
@echo installing CX601 Patch
@echo:
call 601\CX601Patch.batgoto end
:patch522_60_601
cls
@echo installing SRM52RCK Patch
@echo:
call 522\SRM52RCKPatch.bat
@echo:
@echo installing CX601 Patch
@echo:
call 601\CX601Patch.batgoto end
:end
@echo:
@echo done

I think what's confusing things is using the word choice as a label as choice is a keyword in the set statement try change the label to something else like this extract below:-
:option
set /p choice=[1,2,3,4]?if /I "%choice%"=="1" goto patch60_601
if /I "%choice%"=="2" goto patch601
if /I "%choice%"=="3" goto patch522_60_601
if /I "%choice%"=="4" goto end
goto option

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |