andre-teprom - 2020-02-24

I'm deploying a control program based on Codesys that runs on a remote Windows PC where it also runs a relatively heavy program that not rarely crashes the system and some services are also affected.

So far, the PLC service has not been affected, but I do not rule out this possibility, which is why I created a script that at regular intervals checks whether the "" is running or not.

In the current version of the script, I point to the absolute address "C:\Program Files\CODESYS 3.5.15.30\GatewayPLC" where are the programs that I should take down and/or re-instantiate in case of any problem.

However, as we can clearly see, the Codesys version is part of this path, so it would be necessary to regularly review this watchguard script to update the path as long the system is upgraded.

So the question is: Is there any other way than for environment variables for me to reference this address above?