In some circumstances, application crashes, power interruptions, and/or real-time malware scanners can cause a running executable to disappear from its directory. Adding a config variable to specify a location to a backup executable can ensure the system is resilient to potential downtime as a result.
Example: EXE_BACKUP = DISABLED / FULL PATH
if %EXE% not exist
if %EXE_BACKUP% != DISABLED
copy %EXE_BACKUP% %CURRENT_PATH%
else
echo 'EXE not found and backup not enabled, exiting' > log && end
In some circumstances, application crashes, power interruptions, and/or real-time malware scanners can cause a running executable to disappear from its directory. Adding a config variable to specify a location to a backup executable can ensure the system is resilient to potential downtime as a result.
Example: EXE_BACKUP = DISABLED / FULL PATH