comments in INI files
This is a wise specific question.
when you create an INI file with a bunch of comments (;) these are automatically stripped when the MSI is compiled.
Does anybody know how to preserve them?...thanks!
when you create an INI file with a bunch of comments (;) these are automatically stripped when the MSI is compiled.
Does anybody know how to preserve them?...thanks!
0 Comments
[ + ] Show comments
Answers (7)
Please log in to answer
Posted by:
aogilmor
18 years ago
Posted by:
Lillude
18 years ago
I dont have a complete solution for this but got one workaround for this problem.
I used to add "=" without quotes just after the semi colon ";" in each comment line to preserve the comment.
But then you will get the "=" in the begining of comments in the INI file installed. Since "=" is added to a comment line it wont have any issues regarding to the working of INI file.
sample text in INI
[Test]
A=SomeValue
B=SomeValue
;=this is a sample INI file
;=this is to prevent the comment
I used to add "=" without quotes just after the semi colon ";" in each comment line to preserve the comment.
But then you will get the "=" in the begining of comments in the INI file installed. Since "=" is added to a comment line it wont have any issues regarding to the working of INI file.
sample text in INI
[Test]
A=SomeValue
B=SomeValue
;=this is a sample INI file
;=this is to prevent the comment
Posted by:
rikx2
18 years ago
hi,
this instances are not only wise specific, installshield acts the same way when dealing with ini's with commented out entries. to preserve those entries you can place the ini file in the file table (but that would mean problems if your appending entries on an existing ini). another is install you ini using inifile table and then create a text file with the same name as the ini and place all the commented out entries and install in the same location as the ini file so the customer or users installing your application would know what options or usage are available for the ini file. anyways.. it depends on how you or what your customer standards are =)
regards
rik
this instances are not only wise specific, installshield acts the same way when dealing with ini's with commented out entries. to preserve those entries you can place the ini file in the file table (but that would mean problems if your appending entries on an existing ini). another is install you ini using inifile table and then create a text file with the same name as the ini and place all the commented out entries and install in the same location as the ini file so the customer or users installing your application would know what options or usage are available for the ini file. anyways.. it depends on how you or what your customer standards are =)
regards
rik
Posted by:
sikkert
18 years ago
I don't think it is possible to add comments to an ini file, using Windows Installer inifile-tables. This is not a Wise problem, this is Windows Installer. I have had the same problem adding emtpy ini-file values (ie "variable="), and had to add the ini-file as a normal file. I think rikx2's suggestions is good in this case.
Posted by:
sikkert
18 years ago
Posted by:
aogilmor
18 years ago
Posted by:
MSIMaker
18 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.