NST-LI
asked on
Batch script to restart program if it closes.
We host a server that runs a program(rather than service) with a gui at the desktop that cannot be closed. Recently, we have been having issues where it has been closing which is a big problem. Is there a batch script that can be created to start the program if it is closed automatically?
Thanks
Thanks
ASKER
TY for your response AmazingTech,
I have created a batch script using your code and tested on my PC with a random program. I set a scheduled task to run every 10 minutes and the result was a new instance of the program(VLC Player was the test subject) was created. I actually don't understand the code so I can't tell what does what in each line. I have attached some screenshots of what I have done if your curious.
script.bmp
batchscript.bmp
I have created a batch script using your code and tested on my PC with a random program. I set a scheduled task to run every 10 minutes and the result was a new instance of the program(VLC Player was the test subject) was created. I actually don't understand the code so I can't tell what does what in each line. I have attached some screenshots of what I have done if your curious.
script.bmp
batchscript.bmp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window