我有这个.bat文件,我想在后台运行它。该文件基本上启动进程。.bat文件的输出将是:
X:\bin>start_STAF.bat
start_STAF.bat
X:\bin>X:\ActiveState\Perl\perl-5.14.0\bin\perl.exe x:\bin\start_STAF.pl
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
*
STAFProc is now Started. Leave this window up.
*几分钟后按Enter键将控件返回到提示符。我不喜欢这样做,因为这个过程需要通过Perl脚本启动,我也不知道如何通过Perl自动按Enter键。
有几件事我试过了,但没有成功。
我尝试使用START /B start_STAF.bat,但是这样做的是它返回到提示符而没有启动.bat文件。但是,下次执行tasklist时,.bat文件将在stdout上启动。这让我回到了原点。
我尝试将stdout/stderr重定向为start_STAF.bat >nul 2>&1,但这也没有启动.bat文件。
还有什么我能做的吗?谢谢!
发布于 2017-10-12 08:25:39
只需运行命令START start_STAF.bat。
发布于 2019-04-08 17:12:41
适用于windows 10
"C:\Program Files\Oracle\VirtualBox\VBoxHeadless.exe" --comment "linux_mint" --startvm "14f426cc-845d-46cb-9f6e-4dbb31a3769a"Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "syncfiles.bat" & Chr(34), 0
Set WshShell = Nothinghttps://stackoverflow.com/questions/46501299
复制相似问题