Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

add a line to a text file...


5 replies to this topic

Cesar

Cesar
  • Members
  • 21 posts

Posted 02 May 2001 - 16:03

i'd like to knowx how to add a line into a .ini file, i tried "AddProfString" but i don't want to use a "szSectionName"

in the same function, i just need the name of the file (szFileName), the key (szKeyName) and the value, (szValue)...

so ... i don't want this .... =>    [     ]

thanks


Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 02 May 2001 - 16:57

I don;t quite understand. Do you mean that your .ini file doesn't use standard section names which are included in brackets ? If so, you can't use AddProfString and such.

Cesar

Cesar
  • Members
  • 21 posts

Posted 03 May 2001 - 09:39

my .ini don't use brackets

so, how do i do?

thanks


Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 03 May 2001 - 09:47

A possible way is this :

- Use ListReadFromFile to read your  ini-file into a list.
- Use the various list-functions to search for the section-header.
- Add/Change the required keys.
- ListWriteToFile to store the list.

Ide


Cesar

Cesar
  • Members
  • 21 posts

Posted 09 May 2001 - 15:01

i'm going to try this...

thanks...