回复 19# xslxslxsl - @echo off
-
- set app="C:\WINDOWS\system32\notepad.exe"
-
- :: ------------- 隐藏批处理窗口 -------------
- set title=[keep app running]
- title %title%
- nircmdc win hide title "%title%"
- :: ------------- / 隐藏批处理窗口 -------------
-
- nircmdc waitprocess %app%
-
- set n=
-
- :loop
- set /a n += 1
- cls
- echo %n%
-
- :: 或者输出到文件
- >运行次数.txt echo %n%
-
- %app%
- goto loop
复制代码
|