Well, thankfully the mods are asleep so I can (try to) answer your question before it gets locked for you having a terrible attitude.
My answer depends on the flow of your script being like this:
- Ask the user to type xx, yy, or zz
- If your input is the literal string xx, pass some value to a1.bat
- If your input is the literal string yy, pass some other value to a1.bat
- If your input is the literal string zz, pass some third value to a1.bat
- Do not accept any other inputs from the user
- Replace the aa in a1.bat with the final octet as provided by user input (by the way, this is going to require a rewrite of the code you've shown us, because what you've posted will never ever work in a million years; aa is treated like a string instead of a variable so clireg.exe will always receive the input 10.1.0.aa no matter what).
That said, I have no idea what
unless run a1.bat with yy value
unless run a1.bat with zz value
is supposed to mean, so I'm just guessing.
Code: Select all
@echo off
:getInput
set /p "aa=Enter AA value: "
if /i "%aa%"=="xx" (
echo call a1.bat 1
) else if /i "%aa%"=="yy" (
echo call a1.bat 2
) else if /i "%aa%"=="zz" (
echo call a1.bat 3
) else (
echo Invalid input. Please enter xx, yy, or zz.
goto getInput
)
exit /b
To get this to work, you're going to have to change the code of a1.bat to
Code: Select all
CLIREG32.EXE abc.VBR -s 10.1.0.%1 -d -nologo -t abc.TLB -u
CLIREG32.EXE abc.VBR -s 10.1.0.%1 -d -nologo -t abc.TLB
:ENDREG
Although if you're going to edit the code of a1.bat anyway, you might as well just put the input code at the top of the script so that you don't have to write a batch wrapper for a batch script, which is just a ridiculous notion IMO.