Archive: Write to .ini file problem!


Write to .ini file problem!
Hi,i have a problem.I know how to write key and value to .ini file,but i need to have header before them!
some like this:

${WriteINIStrNS} $R0 "$INSTDIR\UninstallConfig.ini" "[Settings]" !??!?!

If is impossible to make this,can i read from .ini file,whithout header [Settings],and how to make that?


Seems to me like you are talking about something that is not a .ini, in that case, use the nsis File* functions and do the work manually (I'm sure someone has done it already, check the wiki and forum)


if i use FileOpen,write,close is ok,but if i use after that WriteINIStrNS-the function is write over written from FileWrite...


There are also some functions shipped with NSIS which can be used instead of the ones from the wiki. They are documented in the NSIS Users Manual, Appendix E

E.2.9 ConfigRead
E.2.10 ConfigReadS (case sensitive version)

E.2.11 ConfigWrite
E.2.12 ConfigWriteS (case sensitive version)

This documentation is also available online, e.g http://nsis.sourceforge.net/Docs/AppendixE.html#E.2.11