@if %1.==. (goto restart_default) ELSE (goto restart) :restart @taskkill /f /im %1 >nul @timeout /t 2 /nobreak >nul @start %1 dpost_test.py >nul @echo restart complete @goto exit :restart_default @taskkill /f /im py.exe >nul @timeout /t 2 /nobreak >nul @start py.exe dpost_test.py >nul @echo restart complete @goto exit :error @echo Please specify a program... @goto exit :exit