The "device=" lines in the System.ini cannot be edited using the normal IniWritePvt function. See BinaryPokeStr for a complete example of how to write "device=" lines into the System.ini.
§ Notes
§ Reference
§ Step by step guide to learning WIL