Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
基本的に、プログラムがゼロ以外の値で終了した場合は、プログラムを再起動する必要があります。
おそらくBATファイルの数行のコードで作成できる単純なプログラムになると思います。誰かがすでに同様のプログラムを書いていて、それを共有したいかどうか疑問に思っています。
Python の場合:
import subprocess while True: rc = subprocess.call('program.exe') if rc == 0: break
これはバッチでの簡単な例です:
:a program.exe IF NOT %ERRORLEVEL% EQU 0 GOTO a