Append a value to INI entry
Posted 28 June 2006 - 13:16
[TheSection]
TheEntry="Value1,Value2"
becomes:
[TheSection]
TheEntry="Value1,Value2,Value3"
I want to avoid script/CA if possible.
When processing the INIFile table, does WI skip over existing entries or simply overwrite the whole entry? If so, I guess I have no choice but to go with script/CA...
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.
Posted 01 July 2006 - 10:28
Stefan Krüger
InstallSite.org twitter facebook
Posted 03 July 2006 - 10:13
Wouldn't it have been more useful, especially for someone coming here in the future, to simply say what the answer is? It is somehwat presumptive to think that folks have MSI help installed. I found the answer here:
http://msdn.microsof...ifile_table.asp
In the INIFile table, set the 'Value' to be the data you want to append and change the 'Action' from its default 0 to 3.
Note that, in the tool I use (Wise), any space between the '=' and the entry (even an existing one) is removed and a space is inserted after the comma which gets added before the new value is appended. That is:
[TheSection]
TheEntry = "Value1,Value2"
becomes:
[TheSection]
TheEntry ="Value1,Value2, Value3"
This may or may not cause issues with certain apps which do not trim spaces from INI data. Guess which camp my app fell into? In the end, I had to resort to script because of that. One day, these clowns will get it right...
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.
Posted 04 July 2006 - 10:30
-Stein Åsmul
Posted 04 July 2006 - 10:47
QUOTE |
Helping someone to help themselves is generally the best type of help. |
Agreed. It would be beyond anyone to say something like "The page 'Creating and editing INI files' in the MSI.CHM file (installed with the Platform SDK) says..."? The requestors get the info he asked for and a pointer to a file/product which will be useful in future (and potentially saves him/her coming here and going through this torture.)
QUOTE |
I have yet to see a deployment tool that does NOT install a copy of the SDK help. |
...except, of course, in corporate deployments where tools are repackaged by, say, an Engineering or Desktop Group who are terrified that some other department (say, Packaging/Deployment) will take over their function, so seek to keep the available toolset restricted.
But that never happens, of course.
Edited by VBScab, 04 July 2006 - 10:53.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.
Posted 04 July 2006 - 10:49
QUOTE (VBScab @ 2006-07-03 11:13) |
Wouldn't it have been more useful, especially for someone coming here in the future, to simply say what the answer is? It is somehwat presumptive to think that folks have MSI help installed. |
In my opinion it's good practice to check the documentation first before posting a question in a forum. I pointed you to the right section of the documentation (granted, I could have also posted a link) in case you hadn't seen it. Also before editing the table I think it's good to read the full documentation about the table to understand any cross-references etc. I didn't see a point in copying the documentation to the forum. Also, this way I saved some time which I could spend answering other questions, while readers leanr to help themselves.
Edited by Stefan Krueger, 04 July 2006 - 10:56.
Stefan Krüger
InstallSite.org twitter facebook
Posted 04 July 2006 - 10:55
QUOTE (VBScab @ 2006-07-04 11:47) | ||
...except, of course, in corporate deployments where tools are repackaged by, say, an Engineering or Desktop Group who are terrified that some other department (say, Packaging/Deployment) will take over their function, so seek to keep the available toolset restricted. But that never happens, right? |
If you are serious about developing MSI setups I think you should have access to the documentation - either a local copy or online at MSDN.
I have a feeling that this discussion is becoming slightly off-topic. If anyone feels the need to discuss this further please open a new thread in the General > Non-Technical > About this Forum section. (This is a valid discussion, just in the wrong place)
Stefan Krüger
InstallSite.org twitter facebook
Posted 04 July 2006 - 11:14
As mentioned earlier, the distro we get for WPS doesn't include the Platform SDK so we get no MSI Help file. Luckily, the Engineering Group here is too stupid to obscure their account details in their scripts so I now have everything I need.
I didn't ask for any documentation to be copied.
As for saving time, how longer is this sentence:
"In the INIFile table, set the 'Value' to be the data you want to append and change the 'Action' from its default 0 to 3."
than this one:
"It depends on the value in the Action column of the INIFile table. For details see MSI Help. "?
I make it 28 characters. I'll bet you made good use of the 1/2 second you saved.
In contrast, *I* took the time to advise people of a potential issue with how the INI entry gets rewritten by WI.
Look, I don't want to fall out with or upset anyone: suffice to say that I think a little understanding about why people post here is warranted.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.
Posted 04 July 2006 - 12:14
QUOTE |
Look, I don't want to fall out with or upset anyone |
Nor do I
As for the time saving: the sentence I've written I was able to write from memory. For the details I would have to look up the documentation myself, and I was leaving this task for you. Thanks for posting the link to the docs.
Stefan Krüger
InstallSite.org twitter facebook