0% found this document useful (0 votes)
61 views

Best Practices For Ini Files

The document discusses best practices for handling common issues with ini files during installation. It describes 5 common issues: 1) files containing comments, 2) repeated values under sections, 3) repeated sections, 4) values too long, and 5) missing section headings. The recommended best practice is to install problematic ini files through the file table instead of the inifile table, and notify the customer to prevent overwriting of settings.

Uploaded by

App Pack
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views

Best Practices For Ini Files

The document discusses best practices for handling common issues with ini files during installation. It describes 5 common issues: 1) files containing comments, 2) repeated values under sections, 3) repeated sections, 4) values too long, and 5) missing section headings. The recommended best practice is to install problematic ini files through the file table instead of the inifile table, and notify the customer to prevent overwriting of settings.

Uploaded by

App Pack
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 6

Best Practices for Ini Files

The inifile table contains the .ini information that the application needs to set in an .ini file.

<image1>

Usual ini file issues encountered are:

1) Ini file contains comments/commented sections


2) Ini file contains repeated value(s) under the same section
3) Ini file contains repeated sections
4) Ini file contains a value or values that are too long for Installshield to handle, results in a clipping
of the information
5) Ini file does not have a section heading

(CTRL + click to be taken straight to the relevant page.)

Refer to the relevant section below for information on how to handle these issues:
1. Ini file contains comments
<image2>

The ini file in the screenshot above contains commented sections designated by a semi-colon, ‘;’. This
is seen as incorrectly formatted by Installshield and is not brought in through the inifile table.

Best Practice:
The best practice in this case is to extract the comment sections from the ini file, and to place them in a
new text file with the same name, installed to the same location.

In the case above the sections highlighted in red are removed from bcl.ini and placed in a new file
called bcl.txt; this is then installed to the same location as bcl.ini, which can in turn then be installed
through the inifile table.
2. Ini file contains repeated values
<image3>

In the ini file above, there are repeated values under the same section headings.

E.g. In ‘section1’ above, Value=10, Value=20.

This ini file is captured properly and included/represented correctly in the inifile table, but when the
application is installed only the first value appears in the ini file:

<image4>

The values highlighted in red in the first screenshot do not appear in the ini file after installation (see
above screenshot) and obviously this is incorrect behavior.

Best Practice:
This is an exception to normal ini file best practice. The ini file in question should be installed through
the file table and the customer should be notified to ensure that no previously existing settings are
overwritten during installation.
3. Ini file contains repeated sections
<image5>

This is a similar scenario to issue two above, but in this case, there are repeated sections in the ini file.
e.g. In the ini file in the screenshot above, section SameSect appears three times with three different
sets of values.

This ini file is captured properly and included/represented correctly in the inifile table, but when the
application is installed only the first section appears in the ini file:

<image6>

Only the first appearance of SameSect is installed (see above screenshot) and the sections highlighted
in red from the first screenshot do not appear. This is incorrect behavior.

Best Practice:
This is an exception to normal ini file best practice. The ini file in question should be installed through
the file table and the customer should be notified to ensure that no settings are overwritten during
installation.
4. Ini file value(s) too long for the inifile table

<image7>

In the ini file above, the value EventScript119 (highlighted section), contains too many characters to
be handled correctly by Installshield. The entry in the inifile table will be a clipped version (i.e. to as
many characters as it can handle) and this will result in information being lost. This is not desired
behavior and can even cause Installshield to crash.

Best Practice:
This is an exception to normal ini file best practice. The ini file in question should be installed through
the file table and the customer should be notified to ensure that no settings are overwritten during
installation.
5. Ini file has no section heading
<image8>

The ini file in the screenshot above has no section heading. This is formatted incorrectly and will not be
captured properly by Installshield.

Best Practice:
This will not be put into the inifile table by Installshield during capture and will instead be put into the
file table. A file in this format should be left to install through the file table. The customer should be
notified in case any entries are overwritten during install.

You might also like