cmd 后台执行

@echo off 
if "%1" == "h" goto begin 
mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit 
:begin

ping 10.101.35.129 -n 100 > temp.txt

原文地址:https://www.cnblogs.com/amize/p/14889059.html