This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Adding to section-less INI file
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 30, 2010
10:40 AM
Adding to section-less INI file
Hello, I am using WriteProfString() to try and add a key=value statement to an ini file. But the ini file does not have any sections, only statements. Using WriteProfString() I notice that the write fails to occur on the section-less ini file. Is it possible to write into a section-less ini file? Any help would be appreciated. Thank you.
Regards,
Randy
Regards,
Randy
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 30, 2010
12:00 PM
Hi Randy,
My thought is that if it lacks sections, it's not truly an *.ini file, and you'd be better served using FileGrep/FileInsertLine.
Fortunately, this is not too hard to switch over to.
--Cary
My thought is that if it lacks sections, it's not truly an *.ini file, and you'd be better served using FileGrep/FileInsertLine.
Fortunately, this is not too hard to switch over to.
--Cary
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 30, 2010
12:17 PM
Thanks for your reply Cary. I agree that ini files generally are divided into sections, but this is considered an ini by our app developers anyway. I am going to try the FileGrep/FileInsertLine method you refer to. Thanks again for your reply.
Randy
Randy
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 31, 2010
10:32 AM
Hello, just in case anyone runs into this same issue and is looking for a solution, Cary's suggestion did the trick it. Using FileGrep to search a line number, and then inserting text using FileInsertLine, overcomes the "section-less" text file issue. Thanks again Cary.
Randy
Randy