A simple explenation of how that could work, could be:
Run mIRC through a .bat file that waits while mIRC is running, then replaces mIRC.ini with the edited one, or applies changes to mIRC.ini from another file, both occuring once mIRC closes.

.bat -> mIRC.exe (Waits untill close) -> Modify mIRC.ini -> Done
--or--
Run mIRC normally, then call a script that runs the .bat, in turn the .bat closes mIRC and applies the changes.
mIRC.exe -> Script function calls .bat -> .bat kills mIRC -> .bat modifies mIRC.ini -> Done

In my opinion, the first one should be more reliable than the second one. However, this would require for you to close mIRC after making the changes, unless you script it to read the modified mIRC.ini


Those who can, cannot. Those who cannot, can.