Skip to content

Instantly share code, notes, and snippets.

@sugi-cho
Last active February 18, 2019 08:20
Show Gist options
  • Save sugi-cho/57776a120387ec657d6a978ba290f050 to your computer and use it in GitHub Desktop.
Save sugi-cho/57776a120387ec657d6a978ba290f050 to your computer and use it in GitHub Desktop.
Unityのアプリを30秒待ってから起動する。起動前にエクスプローラーを殺す。もしアプリがフリーズしたら、10秒で再起動。バッチ自体は最小化した状態で実行
@echo off
if not "%~0"=="%~dp0.\%~nx0" (
start /min cmd /c,"%~dp0.\%~nx0" %*
exit
)
timeout /T 30
:begin
taskkill /F /IM explorer.exe
cd C:\FOLDER_PATH
start /WAIT app.exe -screen-width 1080 -screen-height 1920 -screen-fullscreen 0 -popupwindow
start explorer.exe
timeout /T 10
goto begin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment