Why is this so?
edborg
Posted 02 November 2006 - 05:56 PM
Posted 02 November 2006 - 07:02 PM
Yes for my MakeScript i have got the same problemIt took me quite awhile and a lot of trial and error to find out that the IniWriteTextLine command writes lines in almost reverse order, as shown by the enclosed test (in WB 052 beta3).
Why is this so?
edborg
Posted 02 November 2006 - 07:22 PM
Yes for my MakeScript i have got the same problem
"IniWriteTextLine" write always at the first line of the section
"TextAddLine" have the "Append" option for write at the bottom or "Prepend" for write at the top
So it is not easy write code
Posted 03 November 2006 - 03:15 AM
It also needs "navigate" option with following context string to write in the middleThen the IniWriteTextLine command needs also the options "append" or "prepend"
I'll ask Nuno to add this to next Beta
John
IniWriteTextLine,"file","section","textline",Navigate,"searchstring"
Posted 03 November 2006 - 09:50 AM
Happy to see that I'm not the only one to find it difficult to use.Yes for my MakeScript i have got the same problem
"IniWriteTextLine" write always at the first line of the section
"TextAddLine" have the "Append" option for write at the bottom or "Prepend" for write at the top
So it is not easy write code
Posted 03 November 2006 - 10:39 AM
Posted 09 November 2006 - 03:39 PM
Posted 24 August 2011 - 03:02 PM
Posted 24 August 2011 - 03:15 PM
wow. that's quite an act of necromancy reviving a 5 year old topic!I know this is an old topic, but I'd like to re-open the request for the addition of "place" syntax to the IniWriteText line command (like TextWriteLine) http://code.google.c...wiki/txtaddline
Sometimes it would be nice to place a line in a specific spot in a specific section of an ini.
For TextWriteLine, it would be nice if it also had the ability to find a known line, and place a line/space a specific number of lines above or below that line
Posted 24 August 2011 - 04:17 PM
Posted 24 August 2011 - 04:23 PM
yep textwriteline..I misread the question....no point in having a placement in IniWriteLine as ini files don't care where stuff is as long as it is in the correct section.@Homes32 - I'm guessing you mean the TextWriteLine, since they don't use "Ini" files And yes, this might be handy...(i.e. to more easily find the line number that matched something so we could "insert" additional things in the right place)
@FerrariGuy - Can you give more justification of why (other than human readability and esthetics) that an INI file section contents should be in a specific order?
Posted 24 August 2011 - 05:31 PM
yep textwriteline..I misread the question....no point in having a placement in IniWriteLine as ini files don't care where stuff is as long as it is in the correct section.
Edited by FerrariGuy, 24 August 2011 - 05:32 PM.
Posted 24 August 2011 - 06:19 PM
ha yeah. winpeshl is an exception...as like you deduced, commands are run in the order they are listed and the next command does not run until the previous command terminates, so anything after peshell will never be executed. (except in the event of PEshell's untimely death )
Example/Shaky Justification: WinPEShl.ini executes each command in the order it is listed I believe. From Winpeshl.log, I've noticed that in WinPE7_SE nothing seems to execute after "X:\Program Files\PEShell\PEShell.exe" even if it is listed after that command in Winpeshl.ini. If that observation is correct, one wants to prepend WinPEShell.ini rather than append to it, and IniWriteLine allows you to prepend a section, whereas TextWriteLine does not let you append a certain section. Also, it would be better if I could place my modify computer name script before my register WMI command (both handled by WinPEShl.ini) so that WMI picks up on the new computer name. In this case I could look for a known line and place it a certain distance before said known line, but THAT could be handled by TextWriteLine instead since we'd be giving the command a known reference point. I'm not sure how all ini files for use with any/all programs behave. I was not aware than in general programs using ini files only cared that an entry was just in the correct section rather than also in *a* correct order.
IniWriteTextLine,%TargetDir%\windows\system32\winpeshl.ini,LaunchApps,MyStartCommandup to nuno or peter if there is enough justification for a new command allowing to specify a position within an ini section. otherwise it could be done with an API command executing an autoit script that would read the entire .ini section and insert the string in the specified order.
Posted 24 August 2011 - 06:26 PM
Edited by FerrariGuy, 24 August 2011 - 06:29 PM.
0 members, 0 guests, 0 anonymous users