Access Denied Popup When Running Read-Only AFL File in AmiBroker

Dear Members,

I’m experiencing a repeated warning popup in AmiBroker Professional Edition 6.93.0 (64-bit) on Windows 10 Pro 22H2 (Build 19045.5965).

I’ve intentionally marked my .afl file as read-only to prevent accidental editing. It is stored in:

C:\Program Files\AmiBroker\Formulas\Custom
On every execution, I receive the following popup:

Access to C:\Program Files\AmiBroker\Formulas\Custom\Formula 3692.afl was denied.

After clicking “OK”, the formula executes normally, with all signals, plots, and logic working correctly. However, the popup appears on every run, which is disruptive.

:white_check_mark: Things I’ve Already Tried:
Running AmiBroker as Administrator.

Moving the .afl file to a non-protected folder (e.g., C:\AmiCustom...) — same issue.

Setting file permissions using takeown and icacls.

Disabling Windows Defender real-time protection.

Testing with a simple Plot(Close, "C", colorRed) AFL — same behavior when marked read-only.

:red_question_mark: My Questions:
Is this warning expected behavior when using read-only .afl files?

Can I suppress this popup in a supported way, while still keeping the .afl file protected from editing?

Is AmiBroker attempting a write to the .afl file during execution?

I’d appreciate any guidance on whether this can be resolved.

Thank you in advance.

Best regards,
AK Aggarwal

During just an execution - no. But it might try to write in other circumstances. You might get the message on read-only file when AmiBroker tries to write to it.
It might write to file as result of drag and drop operation, because drag and drop adds code that you dropped to the formula see the manual:

It might also try to write if you open it in the AFL Editor and modify.

1 Like

Thanks a lot, Tomasz. After closing the editor, the issue no longer occurs. Your explanation was spot-on — very helpful.

Thank you for building such a robust platform and for continuing to support the user community so actively.