Wow! Thanks mr Strucc. Changed to service to run as local acc, and now log works! The service (run from local acc) is using this config: C:\Users\SRV\AppData\Roaming\CODESYS\CODESYSControlWinV3\C4DBB537\CODESYSControl.cfg The path you first mentioned (c:\Windows\System32\config\systemprofile\AppData\Roaming) has no CODESYS folder in it (Windows 11 24H2 b26100.3194). Thanks for your help :)
I run CODESYS runtime as a service and use CmpLog (the LogAdd2 function) to log different events to a file. I have done this many times before on various projects and hardware, and it works fine. On this particular system, I have CODESYS 3.5.20.40 running on a Windows 11 PC. The CODESYSControlService autostarts (with Local System credentials, the default), and the application runs fine. However, the configuration file is not read (or at least not the one that should be, or not the CmpLog section),...