How to automate config of app.ini for initial install?

How can we configure the app.ini without a graphical click-ops configuration?

I would like to automate the setup for a variety of use cases, such as setting up labs to disaster recovery.

[security].INSTALL_LOCK = true