YC Yc.W home Systems · C++ · AI Infrastructure
Systems · Note

Windows-bat-loop for restart exe

Explore all Systems notes →

July 10, 2020 2:09 AM

周期重启某个指定的程序

@echo off
:start
choice /t 10 /d y /n >nul
start "" "C:\Users\Administrator\Desktop\XXXX.exe"
choice /t 10 /d y /n >nul
taskkill /F /IM XXXX.exe
goto start

参考:Microsoft Learn:start 和 cd。


AI 修改声明: 本文由 LLM 协助校对,最近修改时间:2026-09-25 02:41(UTC+08:00)。


← Previous 高级搜索树