1.

Solve : batch file,call program and input command?

Answer»
i got a call function ,to call abc.exe
cd/
call abc.exe

how to write the line/command to let user input command after abc.exe?
for example: abc.exe /?,or abc.exe /l /n
the abc.exe should not run first,but after user input the command then hit return,it will then execute


Code: [Select]cd/
set /p command=Enter your command:
call %command%

not working

i ADD this into my batch

:phlrun
cd\
c:\phlash16.exe
set /p command=Enter your command:
call %command%
goto phl

whats wrong?
how to let user type the command after phlash utility, UTILITY NOT RUN first,
if utility run,then user got no chance to type the command

example:user will type this and hit return to run phlash16 utility
phlash16 /y /n
Code: [Select]:phlrun
cd\
set /p switch=Enter your parameters:
c:\phlash16.exe %switch%
goto phl

I'm guessing this is a snippet of a larger piece of code. The goto and the :label do not match.

i've checked.
the :phlrun is the same
but the code given is not correct
it can run under XPcmd but not DOS (bootable dos)You can PASS the data ALONG the command line:

mybatch /y /n
Code: [Select]:phlrun
cd\
c:\phlash16.exe %1 %2
goto phl

Back in the DAY, there were programs that could prompt for data at the console. By putting the console data in the environment space, it would be easily accessible from batch files. Only problem was they used only one environment VARIABLE name. This made for some creative coding on the part of the user.

Try Googling for either answer.com or input.com. I doubt they'll work with XP cmd, but should work with MS-DOS.



Discussion

No Comment Found