从.cmd执行退出代码

时间:2019-01-10 15:37:45

标签: python batch-file

在下面的我们的自动化脚本之一中,执行了命令installer.cmd,但该命令在超时4小时后发出,并且我的主命令状态设置为失败。 如果我能解决此问题,将对您有很大帮助

cd <build path>\Disk1 & start /wait "Upgrade Operation" install.cmd -i silent -DOPTIONS_FILE=\"<build path>\Disk1\upgrade.options\"

install.cmd的内容如下,

:runcommand
set __COMMAND="%__SETUP_EXE%" %__COMMAND_LINE_ARGS%
set __COMMAND_LINE_ARGS=
set __SETUP_EXE=
if %__FROM_CONSOLE% EQU 1 (
  ECHO Info:Executing command - %__COMMAND%
  set __FROM_CONSOLE=
  %__COMMAND%
  ECHO Info:Execution of %__COMMAND% completed
) else (
  ECHO Info:Executing command - %__COMMAND%
  set __FROM_CONSOLE=
  start /wait "" %__COMMAND%
  ECHO Info:Execution of %__COMMAND% completed
)

:: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::
:: END                                                                       ::
:: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::
:end
set __COMMAND_LINE_ARGS=
set __FROM_CONSOLE=
set __SETUP_EXE=
@if "%OS%" == "Windows_NT" endlocal

0 个答案:

没有答案