运行后如何关闭cmd

问题描述 投票:0回答:0

我有start.bat

@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION

set Catalog="\\10.1.1.1\Prog\"
set Nr=1
set UserName=""
set Password=""

pushd %Catalog%
start /B /HIGH /MIN /WAIT "" prog.EXE .F. .F. %Nr% %UserName% %Password%

popd

cmd /c exit
exit
exit 0
exit /B
start /B "" cmd /c exit
move nul 2>&0

问题:

  1. cmd 窗口总是在最前面
  2. cmd 窗口在启动 prog.exe 后不关闭
  3. cmd 仅在关闭 prog.exe 时关闭

那么如何在不关闭prog.exe的情况下运行prog.exe后关闭当前的start.bat?

batch-file
© www.soinside.com 2019 - 2024. All rights reserved.