Reply to Thread

Post a reply to the thread: Edit INI File without sections

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 04-06-2009, 05:24 PM
    Wayne Freeman

    Re: Edit INI File without sections

    I'm not going to try to defend them, Friedrich, but this "ini" file is generated by code descended from prehistorical times when things were less picky.

    Anyway, your answer was what I was expecting, and yes, it helped.

    Thanks,

    Wayne
  • 04-06-2009, 01:41 AM
    linder

    Re: Edit INI File without sections

    Hi Wayne,

    Well, a file with an empty "section header" is NOT an INI file

    See MSDN:
    http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx

    An INI file is defined as:

    [Section1]
    FirstKey = It all worked out okay.
    SecondKey = By golly, it works.
    ThirdKey = Another test.

    The only way to manipulate your text file (not INI file) is to use the "Handle Text File Operation..." function.

    Does this help?

    Friedrich
  • 04-05-2009, 04:36 PM
    Wayne Freeman

    Edit INI File without sections

    Hi Friedrich,

    I'm supporting an existing system that has an INI file that some of my installations have to add entries to.

    This INI file has no sections. When I use the Edit INI File function to add an entry or two, it precedes the new entries with an empty section header, like this:

    existingentry=1
    existingentry=2
    bunchmore=20
    []
    newentry=1
    newentry=2

    I wouldn't expect it to cause a problem, and it appears not to (the application reads its entries without section headers), but it looks a little strange and I'm wondering if there might be a way to get the Edit INI File function to not do that.

    Thanks,

    Wayne

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •