How to make a batch file that detects when the program closes and then restarts the application?

Is there any way I can make the program reopen when it closes?

I have this program that starts; and he pops up; when you click okay, it closes the program. I know that I can run any executable file with a package, but how would I run it myself when it detects that the program is closed?

I can run the program using this code:

@echo off
start "" "C:\Program Files (x86)\Winstep\WinstepXtreme.exe"

But I want this batch file to run when it WinstepXtreme.execompletes.

UPDATE: ok, so the proposed code works, but its activation does not stop, which makes the PC unable to do a certain thing, also the cmd window remains opne, but I fixed it. there are two files in my process list: Nextstart.exe and Workshelf.exe, are not sure if there is a code command where you can enter, if the message "workshelf.exe" exists, then run the workshelf.exe file? If "% ProgramFiles (x86)%" Goto does not exist ???

----------> [SOLUTION] <----------

@echo off

: Restart run "Edit Text" / wait "C: \ Program Files (x86) \ Winstep \ WorkShelf.exe"

Go reboot

workshelf.exe winstep , winstep exe a) b) workshelf, , , .

+4
1

@echo off
:Restart
start "Winstep Xtreme" /wait "C:\Program Files (x86)\Winstep\WinstepXtreme.exe"
goto Restart

. , Winstep Xtreme. , Winstep Xtreme.

, , , Winstep Xtreme.

+3

All Articles