i tried your original code, but replaced the cd command with ecch command to check if it do what it supposed to.
My cmd starts acting starneg and give stupid output not related to what is in the code
Edited:happened because of the double quotes
And the problem was very easy
, I don't know how I didn't notice
When you use the set /p you take the input and store it in the variable "pa", then the batch just continue, we didn't set the command call command not goto ( as goto will divert the flow of the batch commands but the call will just call that part of code then continue from the place it stopped )that divert the batch process to the right tag and each tag had to end with "goto :eof" in order not to got to the next tag and so on and run all one after the other.
Here Try this:
Code: Select all
@echo off
rem *** jump to model according to PA number ***
set "pa="
set /p "pa=PA Number:"
call :%pa%
pause
exit
:PSAT1
:PSAT2
cd biostosh\bios1.exe
goto :eof
:PXLL1
cd biostosh\bios2.exe
goto :eof
put all of your tags after the exit command and make sure each one ends with goto :eof