Restart Apps on Crash

n8chavez

Level 24
Thread author
Well-known
Feb 26, 2021
1,347
2
3,653
2,268
42
I just discovered this freeware application called Restart on Crash, which keeps configured process running even if they have been terminated. It seems to work really well. I can but things like the Windows Firewall Control GUI in there, or it's service, the Sandboxie GUI process, or it's service, Cyberlock, etc. You get the point. I can manually terminate every process that Restart on Crash is configured for and those process will restart. That's awesome! However, me being the nerdy idiot that I am, I started wondering what would happen if the Restart on Crash process itself was terminated. In that case no other process on the list would be safe. Here's my attempted solutions to this problem, none of which have been successful.



1. I tried using sc.exe to create a service based on the RestartonCrash.exe. sc.exe create RestartonCrash binPath= "C:\Windows\RestartonCrash\RestartonCrash.exe" In this case the create service never successfully starts.



2. I tried using the NSSM (Not Sucky Service Manager). "nssm install RestartonCrash" then in the resulting GUI point to to the RestartonCrash.exe, then create the service. This time the resulting service runs; RestartonCrash.exe does run. And if I terminate that process it, well, essentially won't let me. RestartonCrash is always in the task manager. If I kill one of the process that Restart on Crash is supposed to restart that process will restart, I think. I say I think because the terminated process will be shown in the task manager again, but it is no longer visible from the taskbar. Those processes are not functional if I cannot see them in the taskbar.



EDIT - I Solved it. Unfortunately, MalwareTips thinks I'm trying to destroy it and won't let me post the solution here. The best I can do is this pastebin. I think some could find this extremely useful for preventing apps from being terminated.
 
Great job on finding a solution to your problem! It's always interesting to see how different tools interact with each other. Your solution could indeed be very helpful for others who want to ensure their apps remain running. Thanks for sharing the pastebin link, it's a good workaround for forum restrictions.
 
I'm glad you found a way to RestartOnCrash.exe after it crashes or it is terminated. I wouldn't have been able to do it so I can use your solution.

I'm glad it's helpful to you. Let me know if you have any questions.
 
  • Thanks
Reactions: Avethil
I'm glad it's helpful to you. Let me know if you have any questions.
I get this error message: Syntax error on row 1, character 7. Did I something wrong ?

Syntax error.png
 
That depends. Where is your startup.bat file that the startup.vbs is pointing to? The version you screenshotted, which seems to be mine, has the .bat script in c:\scripts\startup.bat. Is that where yours is, because startup.vbs cannot find it. Also, remove the CODE and /CODE plus brackets. That's not part of the script, but was needed for forum posts.
 
  • Like
Reactions: simmerskool
That depends. Where is your startup.bat file that the startup.vbs is pointing to? The version you screenshotted, which seems to be mine, has the .bat script in c:\scripts\startup.bat. Is that where yours is, because startup.vbs cannot find it. Also, remove the CODE and /CODE plus brackets. That's not part of the script, but was needed for forum posts.
I put both files in C:\Scripts and Startup.bat file point to my RestartOnCrash.exe folder location

Scripts folder.jpgstartup.bat.jpg
 
Removing CODE and /CODE plus brackets did the trick. Thank you very much for your help, your solution works like a charm. I exited from RestartOnCrash and it restarted immediately.
 
Also, the reason for the .vbs script is for that you don't have the command line windows flashing or even visible.
 
  • Like
Reactions: simmerskool