Automatically Restart Crashed Or Hanged Applications
Don’t you hate it when programs hang or crash? I find it especially annoying when a background application like an IM client or a bandwidth monitor silently crashes – sometimes I only notice the problem hours later when I’ve already missed a bunch of messages. I’m sure you’ve encountered a few “Not responding” errors and some irritatingly crash-prone applications yourself.
If you have an unstable program that you absolutely need to run at all times, but don’t want to waste your time monitoring and manually restarting it every time it croaks, I might have something interesting for you.
Restart on Crash is an monitoring tool that will watch the applications that you specify and automatically relaunch any program that hangs or crashes. You can add any number of applications to monitor, enable/disable them individually and edit the command line that will be used to restart an application.
Restart on Crash doesn’t require installation and stores all it’s configuration data in a “settings.ini” file in the program’s folder, so it’s portable. It should be compatible with most NT-based Windows versions.
Download Restart on Crash (1.4 MB)
Screenshots & Documentation
- To add a new application to monitor, click the “Add” button or press the Ins key.
- To delete on or more applications from the list, select them and click “Delete” or press Del.
- To edit the per-application configuration, double-click the corresponding row. This will open the editing dialog (see below).
- You can also access the RoC configuration by clicking “Settings” and view the activity log by clicking “Show Log”. The log contains information about crashed/hanged applications, executed commands, and so on.
Well, this one should be pretty self-explanatory 🙂 One detail to keep in mind is that enabling the “It isn’t running” option will make Restart On Crash treat the application as if it has crashed even if you have purposefully it closed it. You can get around this by disabling the monitoring of the application before you close it.
“Grace period” is how long Restart on Crash will wait before trying to terminate/restart an application that it has just terminated/restarted. This is intended to prevent a scenario where RoC kills a hanged program, restarts it, decides it has hanged again (e.g. if the program is non-responsive while starting up) and wrongfully terminates it again.
Known Issues
- If you configure RoC to automatically kill a hanged application, it will terminate all instances of that application when doing so. This may be fixed eventually.
Release Notes
2022-11-02
- The “execute a command” feature can now launch shortcuts (.lnk files). Potentially, it can now run almost any type of file as long as file associations are set up correctly.
2019-12-17
- Improved “application is not responding” detection.
- Added a “Clear Log” button to the Log window.
2019-08-24
- Added a “Restart Now” option to the application pop-up menu. It restarts the selected application immediately without waiting for the grace period to expire.
[…] Descargue y ejecute Reiniciar en caso de bloqueo. Es una buena idea tener la aplicación que desea reiniciar en ejecución porque hace que sea más fácil agregarla a la lista de aplicaciones. Reiniciar en caso de bloqueo debe reiniciarse si se bloquea. […]
Hello,
First, thank you for the ROC application!
When (if) my application unexpectedly terminates, I need to execute a MS Windows Script Host File (.WSF) script in order to correctly relaunch the application, however, it appears that ROC does not recognize .WSF (script files) as executables and therefore the application is never re-launched.
For example, when the app is launched normally, the app opens (two) windows. The second window requires the “OK” button to be clicked in order for the First windows to resume loading. I have created a WSF script file (which uses VBS) to launch the application and then send the [Enter] key stroke command. This satisfies the “OK” button click and then the app continues to load.
Unfortunately, ROC does not recognize executable scripts (specifically .WSF scripts) and so the app Restart fails.
Q: Can you please add support for .WSF as an executable?
(.VBS and .PS1 would be good too but I really need the .WSF)
Here is the log output:
5/8/2020 4:34:33 AM C:\Discovery Freelancer 4.88.1\EXE\flserver.exe is not running
5/8/2020 4:34:33 AM C:\Discovery Freelancer 4.88.1\EXE\flserver.exe will be treated as crashed/hanged
…
5/8/2020 4:40:51 AM Executing a command : “C:\Users\Administrator\Desktop\DFL_Auto_Restart_VBS.wsf”
5/8/2020 4:40:51 AM CreateProcess error : %1 is not a valid Win32 application
5/8/2020 4:41:07 AM Executing a command : “C:\Users\Administrator\Desktop\DFL_Auto_Restart_VBS.wsf”
5/8/2020 4:41:07 AM CreateProcess error : %1 is not a valid Win32 application
…
Also, I can send the .WSF script file if you want to take a look and I can send a screenshot of the config / path if this helps.
Thanks for your time.
Regards,
Ron
I’m not familiar with .WSF scripts, but some quick research suggests that it’s possible to run them from the command line. Maybe the same approach would work with RoC? Try using a command like this:
wscript “c:\full\path\to\script.wsf”
Hi Janis,
Yes, that was it! It worked perfectly. Thank you for the help on this.
Unfortunately this was my first time attempting .wsf / VBS scripts. I tested the script by double-clicking the script, which works, but did not think to perform execute/test from a traditional command-line / CLI or realize that the “Execute a command” field ROC has was the same as Windows CMD.
Again, thank you again for your help!
[…] 1: Đầu tiên các bạn tải Restart on crash tại đây và chọn dòng Download Restart on crash để tải […]
What a nice tip!!! Thank you so much!
Thanks for your tips. I was translate to Vietnamese for my friends <3 Thanks you very much. If you have freetime, you can visit my website at http://techontop.vn/
[…] こちらのページから、ダウンロードします。 […]
[…] 1: Đầu tiên các bạn tải Restart on crash tại đây và chọn dòng Download Restart on crash để tải […]
Thanks for the RoC app. One issue I noticed it that when the programme I’m monitoring closes with an exception error, it only restarts it once. After that RoC says “running” but it’s not, and I need to restart RoC, and then it will also load the crashed app. I’m running the latest version of Win10Pro.
[…] Download and run Restart on crash. It’s a good idea to already have the app you want to restart running because it makes it easier to add it to the list of apps Restart on Crash needs to restart if it crashes. […]
What is the different between crashing with an exception error and crashing in another way? For example, is there some kind of an error message that stays visible even after the application has crashed? Is there maybe a process that has the same name as the program? That’s something that could make RoC think that the program is still running.
I am trying to run a shortcut / .lnk [run as Administrator] because windows bat file fails due to access denied, as a shortcut I am allowed to run as Administrator even though I am an Admin on the local PC. The program requires Administrator access to run, any thoughts?
Running a shortcut is not something that I’ve tried myself, so I don’t have much advice there. Maybe starting RoC itself as Administrator would help?
Thank you for the wonderful program. I store RoC on a network drive. When Windows 10 starts there is a message that says “We can’t verify who created this file”.
Let me know if there is a way to disable this message. The one solution I found was to enable my entire network drive to run unrecognized programs, however, this is not desired.
Thanks.
That could be because I forgot to add a digital signature to the most recent release. I’ve fixed that now. Please try this version:
https://w-shadow.com/files/RestartOnCrash-v1.6.3-signed.zip
It is effectively the same as the previous version, except that I signed the .exe file with my code signing certificate.
When changing the program settings to check run on windows startup I get “An error occurred in the application.” message. I get the same message after I add the application to be monitored. I have noticed there is no INI file created in the root folder. I downloaded the unsigned and signed version and same error message in both. Any ideas?
If it doesn’t create the INI file then that’s probably because the program doesn’t have write access to the folder. Try moving it to a writable location or running it as an administrator.
Great little program, thank you very much. However I get an error everytime it starts up, “The Server Name Or Address Could Not Be Resolved.” Am I doing something wrong or missing a setting somewhere? TIA
I haven’t encountered that particular error before, but it sounds like it could be related to update checks. By default, RoC will automatically check for updates when you start it. I guess the error might mean that it can’t connect to this site for some reason.
If you don’t need it to check for updates, you can turn off the “Check for updates on startup” option in settings.