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

The main window
- 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.

Editing the monitor settings for an application
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.

The configuration dialog. Yes, that’s 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.
Understood. If it makes it easier for you to implement, I would suggest not delaying the actual start of RoC but rather a delay for when to start monitoring the program(s) in its list.
Hi!
My application runs in an cmd “C:\Windows\System32\cmd.exe” with a special Window Title.
If this console app is closed/crashed and an other cmd is also open or started it will be not recognized as crashed.
Can your also check the Window Title to recognize the correct cmd window has crashed?
Greetings from Vienna
Martin
Unfortunately, that’s not supported – RoC doesn’t look at window titles at all.
What if this app itself crashed, what then? Is there a way to run it as a windows service?
Unfortunately, RoC won’t restart itself if it crashes. You can configure it to run automatically on startup. There is no option to run as a Windows service.
I tried adding 2 programs to this for monitoring. Both of these require UAC, wihch is a bit of a pain, but I could start ROC from a task scheduler task if necessary to give it privileged access.
The problem is that it does NOT detect one of the two programs either freezing or crashing.
The app is called “Artemis”, and the executable is “Artemis.UI.Windows.exe”
Even if I kill it with taskkill or fdrom the Task Manager, ROC will keep stating that the application is ‘running’…
Hmm, I’m not sure what could cause it. Is there maybe a second process with the same name? Also, after you kill the process, if you then go to add a new application in RoC and then click “Select a running application…”, does the it still show up in the application list?
Thanks for the quick relpy.
There is only 1 ‘Artemis.UI.Windows.exe’ process according to the Task Manager, and when I kill it, there are none…
Right now, however, ROC won’t even start properly anymore after it crashed once. I may have to restart Windows to get it to work again, and I have other things to do right now than sit and wait for Windows to restart. (I didn’t power up my PC just for the purpose of rebooting it, I just noticed Artemis had crashed again, and wanted something to automatically restart it. I may revisit later, when I can free up a little more time!)
It doesn’t have anything to do with the multiple periods in the name, right?
I don’t think the periods should affect anything.
Hello,
I have the following problem with the roc under win 11. When my program crashes and roc repeats it, my program starts in full screen but the taskbar is displayed. When I click into the program it is gone. If I start my program without roc, it runs without the taskbar. Is there a fix or something?
Thank you for your effort, roc is a great program which has always helped me a lot
I’m not sure what could cause that. My first guess was that maybe the program doesn’t get focus when started by RoC, but I tested that and it looks like a program started that way does get focus, even when RoC itself is minimized. However, this test might not be representative since I’m on Win 10 and I don’t have anything on hand that always starts in full screen.
Another possibility is that when you run the program normally, it starts with some command-line arguments that change its behaviour. If you start it from a shortcut, you could try looking at shortcut properties to see if it has anything special there.
Hello,
Will the source code of the application ever be published?
Probably not in the foreseeable future, but “ever” is a long time. I wouldn’t rule it out completely.
Thanks for your reply.
I just wanted to change the system tray icon so that RoC fits better into the environment where I use it – among game servers. But it’s encoded, and modifying it isn’t easy; even if I calculate the exact length, it still doesn’t work. Never mind though – it’s honestly the best tool I’ve found so far and does exactly what I need. I’d even be happy to pay for such a small tweak if you’d be willing to compile it with a custom icon that I can provide.
In principle, I’m not against you changing the icon, but I’m not sure if I’d want to change it for every user.
Have you tried Resource Hacker?
https://www.angusj.com/resourcehacker/
I have an old version of it, and it does seem to at least recognise the icons in RestartOnCrash.exe. I haven’t tried the current version, though.
Yes, it recognizes what is in Icon or Icon Group, but what is in RCData/TFMAIN
object JvTrayIcon1: TJvTrayIcon
Active = True
Icon.Data = {
it’s a bit of a problem to change it, the program won’t start
Hmm, I tried it myself (with my old version of Resource Hacker) and it looks like it is possible to successfully replace the icon data. Here’s what I did:
1. Find a random 16×16 icon in the .ico format.
2. Convert the icon file to hex using this online tool. The “Use 0x and comma as separator” box should be unchecked. There are probably better tools for that; this was just the first thing I found.
3. This produces 32 characters per line, but the script has 64 characters per line. So copy the result to a text editor and delete every second line break.
4. (Maybe unnecessary) Still in the text editor, add spaces to the beginning of each line to match the indentation of the script.
5. Overwrite the old icon data with the new data, making sure not to delete the curly braces.
6. Compile the script.
6. File -> Save.
The modified .exe starts successfully and shows the new icon in the system tray.
Yes, I managed to fix it too — it was my mistake. The icon was 16×16 pixels, but its size wasn’t the standard 1150 bytes; instead, it was only 898 bytes. At first, I tried to pad it to 1150 bytes with zeros, but that didn’t work. Eventually, I found the correct icon, and now it works as expected.