his ini-write is because he has some weird registry value including THE WHOLE ini-file.
thus there is no reasoning writing each ini-value separately when you can do it all in one writeline.

then, removing all the not-needed sections, writeprofilestring() should be used to trash the not-wanted sections.
after that, readfile() udf can be used to read the whole file back with the correct chr(10) separated format.
_________________________
!

download KiXnet