Simple program crash protection

Fragen, Anregungen zur PC-Wetterstations-Software

Moderatoren: Werner, Tex, weneu

Antworten
tinplate

Simple program crash protection

Beitrag von tinplate »

Maybe this will be useful for some people. It is Simple crash protection for WsWin (and any other program - like WeatherLink, for example).

Run WsWin using this file (wswin.bat)

echo off
cd "c:\program files\wswin"
echo Initial start of WsWin
date /t
time /t
echo -----------
:top
start /w wswin32.exe
echo Restarting WsWin.ext at
date /t
time /t
echo ---------
goto :top

Run WsWin using that batch file. If the program terminates, the batch file will immediately restart it. This technique uses few computer resources.

For it to work, you should also go to My Computer properties. On the Advanced tab, click on the Error Reporting button. In the Error Reporting window, select "Disable error reporting" and do NOT select "But notify me when critical error occur".

If you want to exit WsWin, close the batch file window first, then you can close WsWin without it restarting.

Sorry I can only post in English. It is too hard for Google to translate this well. Maybe someone bilingual can translate this if you think it is useful.
rolsch

Beitrag von rolsch »

Hi,
thanks for this nice script.
I use many scripting for automation my weatherstation.
But... :wink: my wswin32-installation is very stable and has a 23/7 runtime.

<--------------------------->

Mit dem oben genannten Command-Line-Script (DOS-Script) wird WsWin32 gestartet.
Durch die Angabe der Option /w wartet das Script auf das Programmende von WsWin.
Wird nun WsWin wodurch auch immer beendet, startet das Script WsWin erneut.
Das Script befindet sich also in einer Endlosschleife.
Wenn WsWin manuell beendet werden soll,
muss zuerst das Script durch schliessen des Command-Line Fensters beendet werden.
Nun kann WsWin beendet werden.
Aus Performancegründen sollte die Fehlerberichtserstattung des Betriebssystems abgeschaltet werden...
Antworten