In general you should not rely on external configuration in your scripts.
To isolate your script from any configuration, use
/ini=nulcommand line switch:
If you really want to use an external configuration INI file (though again, you should not), set the INI file read-only to prevent WinSCP from trying to update it.
We set the INI file read-only. It works. Thanks for your help.