我有一个批处理脚本,需要调用其他需要标记才能成功运行的批处理脚本。
:adobe_install
echo 1. Adobe Reader & echo 2. Adobe Flash Player & echo 3. Adobe Acrobat
set /p choice="What would you like to install[1-3]: "
if %choice%==1 call "%adobe_path%\adobe.bat"
rem if %choice%==2 call "%cd%\scripts/Adobe/adobe.bat /f"
rem if %choice%==3 call "%cd%\scripts/Adobe/adobe.bat /a"adobe批处理脚本需要一个标志才能成功运行,必须给出下列标志之一:/a,、/r、/f
如何在批处理脚本中运行批处理脚本和标志?
我试过的是:
if %choice%==1 call "%adobe_path%\adobe.bat"
# this works but only outputs the help menu of the script
if %choice%==1 call "%adobe_path%\adobe.bat /r"
# this will output "the syntax of the command is incorrect"
cd "%adobe_path%\scripts\Adobe"
if %choice%==1 call "\.adobe /r"
# same as above
if %choice%==1 start "%adobe_path%\adobe /r"
# launches another cmd and won't run the script发布于 2017-03-20 18:14:19
if %choice%==1 call "%adobe_path%\adobe.bat" /r可执行文件(批处理文件)被引用,以允许名称中的空格。参数由空格(或逗号)分隔。
https://stackoverflow.com/questions/42910973
复制相似问题