Usi le API di win:
WritePrivateProfileString()